2022-08-27 14:59:27 -05:00
|
|
|
#![allow(invalid_value)]
|
|
|
|
|
2021-10-29 18:40:20 -05:00
|
|
|
fn main() {
|
2022-08-27 14:59:27 -05:00
|
|
|
// The array avoids a `Scalar` layout which detects uninit without even doing validation.
|
|
|
|
let _val = unsafe { std::mem::MaybeUninit::<[*const u8; 1]>::uninit().assume_init() };
|
2022-08-01 20:34:28 -05:00
|
|
|
//~^ ERROR: uninitialized
|
2021-10-29 18:40:20 -05:00
|
|
|
}
|