rust/tests/pass/move-uninit-primval.rs
2022-07-11 21:28:54 -04:00

15 lines
202 B
Rust

#![allow(deprecated)]
use std::mem;
struct Foo {
_inner: mem::MaybeUninit<i32>,
}
fn main() {
unsafe {
let foo = Foo { _inner: mem::uninitialized() };
let _bar = foo;
}
}