summary refs log tree commit diff
path: root/src/test/ui/issues/issue-24357.rs
blob: 84f263ff649c4f2d76e9b8e538e0848a08363aa8 (plain)
1
2
3
4
5
6
7
8
9
10
struct NoCopy;
fn main() {
   let x = NoCopy;
   let f = move || { let y = x; };
   //~^ NOTE value moved (into closure) here
   let z = x;
   //~^ ERROR use of moved value: `x`
   //~| NOTE value used here after move
   //~| NOTE move occurs because `x` has type `NoCopy`
}