2019-09-01 17:30:19 -04:00
|
|
|
// check-pass
|
2019-06-01 11:57:22 +01:00
|
|
|
|
|
|
|
|
#![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-09-01 17:30:19 -04:00
|
|
|
let array: [u8; SIZE] = mem::uninitialized();
|
2019-06-01 11:57:22 +01:00
|
|
|
array
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {}
|