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