]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/issue-61422.rs
Rollup merge of #63630 - andjo403:bump_compiler, r=nikomatsakis
[rust.git] / src / test / ui / const-generics / issue-61422.rs
1 // check-pass
2
3 #![feature(const_generics)]
4 //~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
5
6 use std::mem;
7
8 fn foo<const SIZE: usize>() {
9     let arr: [u8; SIZE] = unsafe {
10         #[allow(deprecated)]
11         let array: [u8; SIZE] = mem::uninitialized();
12         array
13     };
14 }
15
16 fn main() {}