]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-move-by-capture.stderr
Auto merge of #58972 - QuietMisdreavus:intra-doc-link-imports, r=GuillaumeGomez
[rust.git] / src / test / ui / borrowck / borrowck-move-by-capture.stderr
1 error[E0507]: cannot move out of captured outer variable in an `FnMut` closure
2   --> $DIR/borrowck-move-by-capture.rs:9:29
3    |
4 LL |     let bar: Box<_> = box 3;
5    |         --- captured outer variable
6 LL |     let _g = to_fn_mut(|| {
7 LL |         let _h = to_fn_once(move || -> isize { *bar });
8    |                             ^^^^^^^^^^^^^^^^ cannot move out of captured outer variable in an `FnMut` closure
9
10 error: aborting due to previous error
11
12 For more information about this error, try `rustc --explain E0507`.