2015-01-08 04:54:35 -06:00
|
|
|
struct Foo(Box<isize>);
|
2014-08-09 22:54:33 -05:00
|
|
|
|
2021-08-24 19:39:40 -05:00
|
|
|
|
|
|
|
|
2014-08-09 22:54:33 -05:00
|
|
|
fn main() {
|
2021-08-24 19:39:40 -05:00
|
|
|
let x: (Box<_>,) = (Box::new(1),);
|
2014-08-09 22:54:33 -05:00
|
|
|
let y = x.0;
|
|
|
|
let z = x.0; //~ ERROR use of moved value: `x.0`
|
|
|
|
|
2021-08-24 19:39:40 -05:00
|
|
|
let x = Foo(Box::new(1));
|
2014-08-09 22:54:33 -05:00
|
|
|
let y = x.0;
|
|
|
|
let z = x.0; //~ ERROR use of moved value: `x.0`
|
|
|
|
}
|