summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-24357.rs
blob: 152e69ebc873f824de0975c6cde6d5a4c22e0fb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
struct NoCopy;
fn main() {
   let x = NoCopy;
   //~^ NOTE move occurs because `x` has type `NoCopy`
   let f = move || { let y = x; };
   //~^ NOTE value moved into closure here
   //~| NOTE variable moved due to use in closure
   let z = x;
   //~^ ERROR use of moved value: `x`
   //~| NOTE value used here after move
}