]> git.proxmox.com Git - rustc.git/blob - tests/ui/moves/move-out-of-tuple-field.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / moves / move-out-of-tuple-field.rs
1 struct Foo(Box<isize>);
2
3
4
5 fn main() {
6 let x: (Box<_>,) = (Box::new(1),);
7 let y = x.0;
8 let z = x.0; //~ ERROR use of moved value: `x.0`
9
10 let x = Foo(Box::new(1));
11 let y = x.0;
12 let z = x.0; //~ ERROR use of moved value: `x.0`
13 }