]>
Commit | Line | Data |
---|---|---|
8faf50e0 | 1 | error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable |
0731742a | 2 | --> $DIR/issue-31424.rs:7:9 |
83c7162d | 3 | | |
532ac7d7 | 4 | LL | (&mut self).bar(); |
0bf4aa26 XL |
5 | | ^^^^^^^^^^^ |
6 | | | | |
7 | | cannot borrow as mutable | |
8 | | try removing `&mut` here | |
83c7162d | 9 | |
0bf4aa26 | 10 | warning: function cannot return without recursing |
0731742a | 11 | --> $DIR/issue-31424.rs:12:5 |
83c7162d | 12 | | |
94b46f34 | 13 | LL | fn bar(self: &mut Self) { |
0bf4aa26 | 14 | | ^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing |
532ac7d7 XL |
15 | LL | |
16 | LL | (&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 | ||
22 | error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable | |
0731742a | 23 | --> $DIR/issue-31424.rs:14:9 |
0bf4aa26 | 24 | | |
532ac7d7 | 25 | LL | (&mut self).bar(); |
0bf4aa26 XL |
26 | | ^^^^^^^^^^^ |
27 | | | | |
28 | | cannot borrow as mutable | |
29 | | try removing `&mut` here | |
83c7162d XL |
30 | |
31 | error: aborting due to 2 previous errors | |
32 | ||
33 | For more information about this error, try `rustc --explain E0596`. |