]> git.proxmox.com Git - rustc.git/blame - src/test/ui/did_you_mean/issue-31424.nll.stderr
New upstream version 1.35.0+dfsg1
[rustc.git] / src / test / ui / did_you_mean / issue-31424.nll.stderr
CommitLineData
8faf50e0 1error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable
0731742a 2 --> $DIR/issue-31424.rs:7:9
83c7162d 3 |
532ac7d7 4LL | (&mut self).bar();
0bf4aa26
XL
5 | ^^^^^^^^^^^
6 | |
7 | cannot borrow as mutable
8 | try removing `&mut` here
83c7162d 9
0bf4aa26 10warning: function cannot return without recursing
0731742a 11 --> $DIR/issue-31424.rs:12:5
83c7162d 12 |
94b46f34 13LL | fn bar(self: &mut Self) {
0bf4aa26 14 | ^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
532ac7d7
XL
15LL |
16LL | (&mut self).bar();
0bf4aa26
XL
17 | ----------------- recursive call site
18 |
19 = note: #[warn(unconditional_recursion)] on by default
20 = help: a `loop` may express intention better if this is on purpose
21
22error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable
0731742a 23 --> $DIR/issue-31424.rs:14:9
0bf4aa26 24 |
532ac7d7 25LL | (&mut self).bar();
0bf4aa26
XL
26 | ^^^^^^^^^^^
27 | |
28 | cannot borrow as mutable
29 | try removing `&mut` here
83c7162d
XL
30
31error: aborting due to 2 previous errors
32
33For more information about this error, try `rustc --explain E0596`.