]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issue-21600.stderr
added function to check if lints belong to an external macro
[rust.git] / src / test / ui / issue-21600.stderr
1 error[E0387]: cannot borrow data mutably in a captured outer variable in an `Fn` closure
2   --> $DIR/issue-21600.rs:24:17
3    |
4 LL |         call_it(|| x.gen_mut()); //~ ERROR cannot borrow data mutably in a captured outer
5    |                 ^^
6    |
7 help: consider changing this to accept closures that implement `FnMut`
8   --> $DIR/issue-21600.rs:22:13
9    |
10 LL |       call_it(|| {
11    |  _____________^
12 LL | |         call_it(|| x.gen());
13 LL | |         call_it(|| x.gen_mut()); //~ ERROR cannot borrow data mutably in a captured outer
14 LL | |         //~^ ERROR cannot borrow data mutably in a captured outer
15 LL | |     });
16    | |_____^
17
18 error[E0387]: cannot borrow data mutably in a captured outer variable in an `Fn` closure
19   --> $DIR/issue-21600.rs:24:20
20    |
21 LL |         call_it(|| x.gen_mut()); //~ ERROR cannot borrow data mutably in a captured outer
22    |                    ^
23    |
24 help: consider changing this closure to take self by mutable reference
25   --> $DIR/issue-21600.rs:24:17
26    |
27 LL |         call_it(|| x.gen_mut()); //~ ERROR cannot borrow data mutably in a captured outer
28    |                 ^^^^^^^^^^^^^^
29
30 error: aborting due to 2 previous errors
31
32 For more information about this error, try `rustc --explain E0387`.