mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
16 lines
318 B
Rust
16 lines
318 B
Rust
//@ compile-flags: -O
|
|
|
|
#![crate_type = "lib"]
|
|
|
|
use std::mem::MaybeUninit;
|
|
|
|
pub fn maybe_uninit() -> [MaybeUninit<u8>; 3000] {
|
|
// CHECK-NOT: memset
|
|
[MaybeUninit::uninit(); 3000]
|
|
}
|
|
|
|
pub fn maybe_uninit_const<T>() -> [MaybeUninit<T>; 8192] {
|
|
// CHECK-NOT: memset
|
|
[const { MaybeUninit::uninit() }; 8192]
|
|
}
|