]> git.lizzy.rs Git - rust.git/blob - src/test/ui/did_you_mean/issue-34126.nll.stderr
Rollup merge of #52656 - jD91mZM2:stablize-uds, r=alexcrichton
[rust.git] / src / test / ui / did_you_mean / issue-34126.nll.stderr
1 error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable
2   --> $DIR/issue-34126.rs:16:18
3    |
4 LL |         self.run(&mut self); //~ ERROR cannot borrow
5    |                  ^^^^^^^^^
6    |                  |
7    |                  cannot borrow as mutable
8    |                  try removing `&mut` here
9
10 error[E0502]: cannot borrow `self` as mutable because it is also borrowed as immutable
11   --> $DIR/issue-34126.rs:16:18
12    |
13 LL |         self.run(&mut self); //~ ERROR cannot borrow
14    |         ---------^^^^^^^^^-
15    |         |        |
16    |         |        mutable borrow occurs here
17    |         immutable borrow occurs here
18    |         borrow later used here
19
20 error: aborting due to 2 previous errors
21
22 Some errors occurred: E0502, E0596.
23 For more information about an error, try `rustc --explain E0502`.