2022-08-24 23:53:31 -05:00
|
|
|
//@ compile-flags: -O
|
|
|
|
|
|
|
|
#![crate_type = "lib"]
|
|
|
|
|
|
|
|
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]
|
|
|
|
}
|