2017-05-27 19:58:52 +02:00
|
|
|
error[E0596]: cannot borrow immutable argument `self` as mutable
|
2016-11-01 23:15:02 -07:00
|
|
|
--> $DIR/issue-31424.rs:17:15
|
|
|
|
|
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | (&mut self).bar(); //~ ERROR cannot borrow
|
2016-11-01 23:15:02 -07:00
|
|
|
| ^^^^
|
|
|
|
| |
|
|
|
|
| cannot reborrow mutably
|
2017-07-05 09:58:22 -07:00
|
|
|
| try removing `&mut` here
|
2016-11-01 23:15:02 -07:00
|
|
|
|
2017-05-27 19:58:52 +02:00
|
|
|
error[E0596]: cannot borrow immutable argument `self` as mutable
|
2016-11-01 23:15:02 -07:00
|
|
|
--> $DIR/issue-31424.rs:23:15
|
|
|
|
|
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | (&mut self).bar(); //~ ERROR cannot borrow
|
2016-11-01 23:15:02 -07:00
|
|
|
| ^^^^ cannot borrow mutably
|
2018-05-25 20:33:15 +02:00
|
|
|
help: consider removing the `&mut`, as it is an immutable binding to a mutable reference
|
|
|
|
|
|
|
|
|
LL | self.bar(); //~ ERROR cannot borrow
|
|
|
|
| ^^^^
|
2016-11-01 23:15:02 -07:00
|
|
|
|
2017-07-02 13:49:30 +03:00
|
|
|
error: aborting due to 2 previous errors
|
2016-11-01 23:15:02 -07:00
|
|
|
|
2018-03-03 15:59:40 +01:00
|
|
|
For more information about this error, try `rustc --explain E0596`.
|