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

17 lines
335 B
Rust
Raw Normal View History

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