2015-01-08 21:54:35 +11:00
|
|
|
struct Foo(Box<isize>);
|
2014-08-10 15:54:33 +12:00
|
|
|
|
2021-08-25 02:39:40 +02:00
|
|
|
|
|
|
|
|
2014-08-10 15:54:33 +12:00
|
|
|
fn main() {
|
2021-08-25 02:39:40 +02:00
|
|
|
let x: (Box<_>,) = (Box::new(1),);
|
2014-08-10 15:54:33 +12:00
|
|
|
let y = x.0;
|
|
|
|
let z = x.0; //~ ERROR use of moved value: `x.0`
|
|
|
|
|
2021-08-25 02:39:40 +02:00
|
|
|
let x = Foo(Box::new(1));
|
2014-08-10 15:54:33 +12:00
|
|
|
let y = x.0;
|
|
|
|
let z = x.0; //~ ERROR use of moved value: `x.0`
|
|
|
|
}
|