Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c4f067e

Browse files
committedNov 9, 2021
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

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)
Please sign in to comment.