Add regression test for #61422

This commit is contained in:
varkor 2019-06-01 11:57:22 +01:00
parent 5a2410a07c
commit e82cd9528c
2 changed files with 21 additions and 0 deletions

View file

@ -0,0 +1,15 @@
// run-pass
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
use std::mem;
fn foo<const SIZE: usize>() {
let arr: [u8; SIZE] = unsafe {
let mut array: [u8; SIZE] = mem::uninitialized();
array
};
}
fn main() {}

View file

@ -0,0 +1,6 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
--> $DIR/issue-61422.rs:3:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^