rust/tests/pass/move-uninit-primval.rs
2022-06-20 16:09:45 -07:00

14 lines
220 B
Rust

// compile-flags: -Zmiri-allow-uninit-numbers
#![allow(deprecated)]
struct Foo {
_inner: i32,
}
fn main() {
unsafe {
let foo = Foo { _inner: std::mem::uninitialized() };
let _bar = foo;
}
}