]>
Commit | Line | Data |
---|---|---|
0bf4aa26 | 1 | warning: function cannot return without recursing |
48663c56 | 2 | --> $DIR/issue-51191.rs:4:5 |
0bf4aa26 XL |
3 | | |
4 | LL | fn bar(self: &mut Self) { | |
5 | | ^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing | |
532ac7d7 | 6 | LL | |
0bf4aa26 XL |
7 | LL | (&mut self).bar(); |
8 | | ----------------- recursive call site | |
9 | | | |
416331ca | 10 | = note: `#[warn(unconditional_recursion)]` on by default |
0bf4aa26 XL |
11 | = help: a `loop` may express intention better if this is on purpose |
12 | ||
13 | error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable | |
48663c56 | 14 | --> $DIR/issue-51191.rs:6:9 |
0bf4aa26 XL |
15 | | |
16 | LL | (&mut self).bar(); | |
17 | | ^^^^^^^^^^^ | |
18 | | | | |
19 | | cannot borrow as mutable | |
20 | | try removing `&mut` here | |
21 | ||
22 | error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable | |
48663c56 | 23 | --> $DIR/issue-51191.rs:11:9 |
0bf4aa26 XL |
24 | | |
25 | LL | fn imm(self) { | |
26 | | ---- help: consider changing this to be mutable: `mut self` | |
27 | LL | (&mut self).bar(); | |
28 | | ^^^^^^^^^^^ cannot borrow as mutable | |
29 | ||
30 | error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable | |
48663c56 | 31 | --> $DIR/issue-51191.rs:20:9 |
0bf4aa26 XL |
32 | | |
33 | LL | (&mut self).bar(); | |
34 | | ^^^^^^^^^^^ cannot borrow as mutable | |
35 | ||
36 | error[E0596]: cannot borrow data in a `&` reference as mutable | |
48663c56 | 37 | --> $DIR/issue-51191.rs:20:9 |
0bf4aa26 XL |
38 | | |
39 | LL | (&mut self).bar(); | |
40 | | ^^^^^^^^^^^ cannot borrow as mutable | |
41 | ||
42 | error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable | |
48663c56 | 43 | --> $DIR/issue-51191.rs:26:9 |
0bf4aa26 XL |
44 | | |
45 | LL | (&mut self).bar(); | |
46 | | ^^^^^^^^^^^ | |
47 | | | | |
48 | | cannot borrow as mutable | |
49 | | try removing `&mut` here | |
50 | ||
51 | error: aborting due to 5 previous errors | |
52 | ||
53 | For more information about this error, try `rustc --explain E0596`. |