rust/tests/compile-fail/uninit_raw_ptr.rs

5 lines
187 B
Rust
Raw Normal View History

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