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 5, 2021
1 parent 09b24ae commit ef28253
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 ef28253

Please sign in to comment.