rust/tests/fail/validity/uninit_integer.rs
2022-07-11 11:48:56 +00:00

7 lines
299 B
Rust

// This test is from https://github.com/rust-lang/miri/issues/1340#issue-600900312.
fn main() {
let _val = unsafe { std::mem::MaybeUninit::<usize>::uninit().assume_init() };
//~^ ERROR: constructing invalid value at .value: encountered uninitialized bytes, but expected initialized bytes
}