From b5fe042187854ab8df783a24353cc5777565150f Mon Sep 17 00:00:00 2001 From: Alex Macleod Date: Sun, 22 Aug 2021 18:06:48 +0100 Subject: [PATCH] Use original ICE for 86535 Closes #901 The previous version had a separate issue opened for it which was resolved (https://github.com/rust-lang/rust/issues/87935) --- ices/86535.rs | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/ices/86535.rs b/ices/86535.rs index 63109dcd..ba551f9e 100644 --- a/ices/86535.rs +++ b/ices/86535.rs @@ -1,4 +1,20 @@ -#![feature(box_syntax)] -fn main() { - let _: Box<[isize]> = box { loop {} }; +#![allow(incomplete_features)] +#![feature(const_generics)] +#![feature(const_evaluatable_checked)] + +struct F; +impl X for F<{ S }> { + const W: usize = 3; + + fn d(r: &[u8; Self::W]) -> F<{ S }> { + let x: [u8; Self::W] = [0; Self::W]; + F + } } + +pub trait X { + const W: usize; + fn d(r: &[u8; Self::W]) -> Self; +} + +fn main() {}