]>
Commit | Line | Data |
---|---|---|
48663c56 XL |
1 | error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable |
2 | --> $DIR/issue-31424.rs:7:9 | |
476ff2be | 3 | | |
532ac7d7 | 4 | LL | (&mut self).bar(); |
48663c56 XL |
5 | | ^^^^^^^^^^^ |
6 | | | | |
7 | | cannot borrow as mutable | |
8 | | try removing `&mut` here | |
476ff2be | 9 | |
0bf4aa26 | 10 | warning: function cannot return without recursing |
0731742a | 11 | --> $DIR/issue-31424.rs:12:5 |
0bf4aa26 XL |
12 | | |
13 | LL | fn bar(self: &mut Self) { | |
14 | | ^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing | |
532ac7d7 XL |
15 | LL | |
16 | LL | (&mut self).bar(); | |
0bf4aa26 XL |
17 | | ----------------- recursive call site |
18 | | | |
416331ca | 19 | = note: `#[warn(unconditional_recursion)]` on by default |
0bf4aa26 XL |
20 | = help: a `loop` may express intention better if this is on purpose |
21 | ||
48663c56 XL |
22 | error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable |
23 | --> $DIR/issue-31424.rs:14:9 | |
476ff2be | 24 | | |
532ac7d7 | 25 | LL | (&mut self).bar(); |
48663c56 XL |
26 | | ^^^^^^^^^^^ |
27 | | | | |
28 | | cannot borrow as mutable | |
29 | | try removing `&mut` here | |
476ff2be | 30 | |
ba9703b0 | 31 | error: aborting due to 2 previous errors; 1 warning emitted |
476ff2be | 32 | |
0531ce1d | 33 | For more information about this error, try `rustc --explain E0596`. |