2017-09-16 04:39:51 -05:00
|
|
|
// Moving around undef is not allowed by validation
|
|
|
|
// compile-flags: -Zmir-emit-validate=0
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|