Files
rust/src/test/ui/const-generics/issues/issue-61422.rs

17 lines
333 B
Rust
Raw Normal View History

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