Skip to content

Commit

Permalink
Add test for uninit raw ptrs
Browse files Browse the repository at this point in the history
  • Loading branch information
camelid committed Nov 9, 2021
1 parent 8bac26b commit c4f067e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/compile-fail/uninit_raw_ptr.rs
Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit c4f067e

Please sign in to comment.