mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
14 lines
251 B
Rust
14 lines
251 B
Rust
struct Foo(Box<isize>);
|
|
|
|
|
|
|
|
fn main() {
|
|
let x: (Box<_>,) = (Box::new(1),);
|
|
let y = x.0;
|
|
let z = x.0; //~ ERROR use of moved value: `x.0`
|
|
|
|
let x = Foo(Box::new(1));
|
|
let y = x.0;
|
|
let z = x.0; //~ ERROR use of moved value: `x.0`
|
|
}
|