]> git.lizzy.rs Git - rust.git/blob - tests/ui/issues/issue-24357.rs
Rollup merge of #107114 - Erk-:add-absolute-note-to-path-join, r=m-ou-se
[rust.git] / tests / ui / issues / issue-24357.rs
1 struct NoCopy;
2 fn main() {
3    let x = NoCopy;
4    //~^ NOTE move occurs because `x` has type `NoCopy`
5    let f = move || { let y = x; };
6    //~^ NOTE value moved into closure here
7    //~| NOTE variable moved due to use in closure
8    let z = x;
9    //~^ ERROR use of moved value: `x`
10    //~| NOTE value used here after move
11 }