]> git.lizzy.rs Git - rust.git/blob - tests/ui/moves/move-out-of-tuple-field.rs
Rollup merge of #106323 - starkat99:stabilize-f16c_target_feature, r=petrochenkov
[rust.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 }