Skip to content

Commit c4f067e

Browse files
committed
Add test for uninit raw ptrs
1 parent 8bac26b commit c4f067e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/compile-fail/uninit_raw_ptr.rs

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
fn main() {
2+
let _val = unsafe { std::mem::MaybeUninit::<*const u8>::uninit().assume_init() };
3+
//~^ ERROR type validation failed at .value: encountered uninitialized raw pointer
4+
}

0 commit comments

Comments
 (0)