rust/tests/compile-fail/uninit_raw_ptr.rs
2021-11-10 11:36:42 -08:00

5 lines
187 B
Rust

fn main() {
let _val = unsafe { std::mem::MaybeUninit::<*const u8>::uninit().assume_init() };
//~^ ERROR type validation failed at .value: encountered uninitialized raw pointer
}