rust/tests/run-pass/move-uninit-primval.rs

15 lines
195 B
Rust
Raw Normal View History

2019-07-06 02:33:22 -05:00
#![allow(deprecated)]
2016-12-21 19:26:52 -06:00
struct Foo {
_inner: i32,
}
fn main() {
unsafe {
let foo = Foo {
_inner: std::mem::uninitialized(),
};
let _bar = foo;
}
}