Auto merge of #4780 - flip1995:ice_4775, r=phansch

Fix ICE #4775

Fixes #4775

changelog: Fix ICE with const_generics
This commit is contained in:
bors 2019-11-11 06:23:27 +00:00
commit 338f5e6801
2 changed files with 21 additions and 1 deletions

14
tests/ui/ice-4775.rs Normal file
View file

@ -0,0 +1,14 @@
#![feature(const_generics)]
#![allow(incomplete_features)]
pub struct ArrayWrapper<const N: usize>([usize; N]);
impl<const N: usize> ArrayWrapper<{ N }> {
pub fn ice(&self) {
for i in self.0.iter() {
println!("{}", i);
}
}
}
fn main() {}