]> git.proxmox.com Git - rustc.git/blob - src/test/ui/did_you_mean/issue-34126.stderr
New upstream version 1.56.0~beta.4+dfsg1
[rustc.git] / src / test / ui / did_you_mean / issue-34126.stderr
1 error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable
2 --> $DIR/issue-34126.rs:6:18
3 |
4 LL | self.run(&mut self);
5 | ^^^^^^^^^ cannot borrow as mutable
6 |
7 note: the binding is already a mutable borrow
8 --> $DIR/issue-34126.rs:5:14
9 |
10 LL | fn start(&mut self) {
11 | ^^^^^^^^^
12 help: try removing `&mut` here
13 |
14 LL - self.run(&mut self);
15 LL + self.run(self);
16 |
17
18 error[E0502]: cannot borrow `self` as mutable because it is also borrowed as immutable
19 --> $DIR/issue-34126.rs:6:18
20 |
21 LL | self.run(&mut self);
22 | ---- --- ^^^^^^^^^ mutable borrow occurs here
23 | | |
24 | | immutable borrow later used by call
25 | immutable borrow occurs here
26
27 error: aborting due to 2 previous errors
28
29 Some errors have detailed explanations: E0502, E0596.
30 For more information about an error, try `rustc --explain E0502`.