From 073dbd42182febdf35f5193e891c4e24722dbca9 Mon Sep 17 00:00:00 2001 From: flip1995 Date: Wed, 6 Nov 2019 18:15:04 +0100 Subject: [PATCH] Add regression test for ICE #4775 --- tests/ui/ice-4775.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/ui/ice-4775.rs diff --git a/tests/ui/ice-4775.rs b/tests/ui/ice-4775.rs new file mode 100644 index 00000000000..31e53e846d5 --- /dev/null +++ b/tests/ui/ice-4775.rs @@ -0,0 +1,14 @@ +#![feature(const_generics)] +#![allow(incomplete_features)] + +pub struct ArrayWrapper([usize; N]); + +impl ArrayWrapper<{ N }> { + pub fn ice(&self) { + for i in self.0.iter() { + println!("{}", i); + } + } +} + +fn main() {}