Add test for uninit raw ptrs
This commit is contained in:
parent
b3be6b44b6
commit
1cca2acf95
4
tests/compile-fail/uninit_raw_ptr.rs
Normal file
4
tests/compile-fail/uninit_raw_ptr.rs
Normal file
@ -0,0 +1,4 @@
|
||||
fn main() {
|
||||
let _val = unsafe { std::mem::MaybeUninit::<*const u8>::uninit().assume_init() };
|
||||
//~^ ERROR type validation failed at .value: encountered uninitialized raw pointer
|
||||
}
|
Loading…
Reference in New Issue
Block a user