]> git.lizzy.rs Git - rust.git/blob - src/test/ui/moves/move-out-of-tuple-field.rs
Auto merge of #73660 - flip1995:clippyup, r=nikomatsakis
[rust.git] / src / test / ui / moves / move-out-of-tuple-field.rs
1 #![feature(box_syntax)]
2
3 struct Foo(Box<isize>);
4
5 fn main() {
6     let x: (Box<_>,) = (box 1,);
7     let y = x.0;
8     let z = x.0; //~ ERROR use of moved value: `x.0`
9
10     let x = Foo(box 1);
11     let y = x.0;
12     let z = x.0; //~ ERROR use of moved value: `x.0`
13 }