2022-08-24 23:53:31 -05:00
|
|
|
// compile-flags: -O
|
|
|
|
|
|
|
|
#![crate_type = "lib"]
|
2022-08-29 22:09:25 -05:00
|
|
|
#![feature(inline_const)]
|
2022-08-24 23:53:31 -05:00
|
|
|
|
|
|
|
use std::mem::MaybeUninit;
|
|
|
|
|
|
|
|
pub fn maybe_uninit() -> [MaybeUninit<u8>; 3000] {
|
|
|
|
// CHECK-NOT: memset
|
|
|
|
[MaybeUninit::uninit(); 3000]
|
|
|
|
}
|
2022-08-29 22:09:25 -05:00
|
|
|
|
|
|
|
pub fn maybe_uninit_const<T>() -> [MaybeUninit<T>; 8192] {
|
|
|
|
// CHECK-NOT: memset
|
|
|
|
[const { MaybeUninit::uninit() }; 8192]
|
|
|
|
}
|