summary refs log tree commit diff
path: root/src/test/ui/const-generics/issues/issue-61422.rs
blob: 45d37b6a2f3c5d115214bb5dd00954e94f112ad0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// check-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)]
        let array: [u8; SIZE] = mem::uninitialized();
        array
    };
}

fn main() {}