]> git.proxmox.com Git - rustc.git/blame - src/test/ui/suggestions/option-content-move2.stderr
New upstream version 1.64.0+dfsg1
[rustc.git] / src / test / ui / suggestions / option-content-move2.stderr
CommitLineData
60c5eb7d
XL
1error[E0507]: cannot move out of `var`, a captured variable in an `FnMut` closure
2 --> $DIR/option-content-move2.rs:9:9
3 |
064997fb
FG
4LL | let mut var = None;
5 | ------- captured outer variable
6LL | func(|| {
7 | -- captured by this `FnMut` closure
8LL | // Shouldn't suggest `move ||.as_ref()` here
9LL | move || {
10 | ^^^^^^^ move out of `var` occurs here
11LL |
12LL | var = Some(NotCopyable);
13 | ---
14 | |
15 | variable moved due to use in closure
16 | move occurs because `var` has type `Option<NotCopyable>`, which does not implement the `Copy` trait
60c5eb7d
XL
17
18error: aborting due to previous error
19
20For more information about this error, try `rustc --explain E0507`.