blob: 2e4bcc7f95947e31811a5d2baf549cfc9e52d491 [file] [log] [blame]
error[E0596]: cannot borrow immutable argument `self` as mutable
--> $DIR/issue-31424.rs:17:15
|
LL | (&mut self).bar(); //~ ERROR cannot borrow
| ^^^^
| |
| cannot reborrow mutably
| try removing `&mut` here
warning: function cannot return without recursing
--> $DIR/issue-31424.rs:22:5
|
LL | fn bar(self: &mut Self) {
| ^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
LL | //~^ WARN function cannot return without recursing
LL | (&mut self).bar(); //~ ERROR cannot borrow
| ----------------- recursive call site
|
= note: #[warn(unconditional_recursion)] on by default
= help: a `loop` may express intention better if this is on purpose
error[E0596]: cannot borrow immutable argument `self` as mutable
--> $DIR/issue-31424.rs:24:15
|
LL | (&mut self).bar(); //~ ERROR cannot borrow
| ^^^^ cannot borrow mutably
help: consider removing the `&mut`, as it is an immutable binding to a mutable reference
|
LL | self.bar(); //~ ERROR cannot borrow
| ^^^^
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0596`.