Skip to content

Commit 40ef30f

Browse files
committed
Add test for uninit raw ptrs
1 parent 90510cb commit 40ef30f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/compile-fail/uninit_raw_ptr.rs

Lines changed: 4 additions & 0 deletions
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)