1 error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable
2 --> $DIR/issue-31424.rs:7:9
4 LL | (&mut self).bar();
5 | ^^^^^^^^^^^ cannot borrow as mutable
7 note: the binding is already a mutable borrow
8 --> $DIR/issue-31424.rs:6:12
10 LL | fn foo(&mut self) {
12 help: try removing `&mut` here
13 --> $DIR/issue-31424.rs:7:9
15 LL | (&mut self).bar();
18 warning: function cannot return without recursing
19 --> $DIR/issue-31424.rs:13:5
21 LL | fn bar(self: &mut Self) {
22 | ^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
24 LL | (&mut self).bar();
25 | ----------------- recursive call site
27 = note: `#[warn(unconditional_recursion)]` on by default
28 = help: a `loop` may express intention better if this is on purpose
30 error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable
31 --> $DIR/issue-31424.rs:16:9
33 LL | (&mut self).bar();
34 | ^^^^^^^^^^^ cannot borrow as mutable
36 note: the binding is already a mutable borrow
37 --> $DIR/issue-31424.rs:13:18
39 LL | fn bar(self: &mut Self) {
41 help: try removing `&mut` here
42 --> $DIR/issue-31424.rs:16:9
44 LL | (&mut self).bar();
47 error: aborting due to 2 previous errors; 1 warning emitted
49 For more information about this error, try `rustc --explain E0596`.