You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
structNoCopy;fnmain(){let x = NoCopy;let f = move || {let y = x;};let z = x;}
<anon>:5:8: 5:9 error: use of moved value: `x`
<anon>:5 let z = x;
^
<anon>:4:17: 4:34 note: `x` moved into closure environment here because it has type `[closure(())]`, which is non-copyable
<anon>:4 let f = move || { let y = x; };
^~~~~~~~~~~~~~~~~
<anon>:4:34: 4:34 help: perhaps you meant to use `clone()`?
Presumably the error message should say because it has type NoCopy which is non-copyable.