2019-06-01 11:57:22 +01:00
|
|
|
// 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 {
|
2019-07-04 11:24:56 -04:00
|
|
|
#[allow(deprecated)]
|
2019-06-01 11:57:22 +01:00
|
|
|
let mut array: [u8; SIZE] = mem::uninitialized();
|
|
|
|
|
array
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {}
|