2017-05-27 17:58:52 +00:00
|
|
|
error[E0596]: cannot borrow immutable argument `self` as mutable
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/issue-31424.rs:7:15
|
2016-11-02 06:15:02 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | (&mut self).bar();
|
2016-11-02 06:15:02 +00:00
|
|
|
| ^^^^
|
|
|
|
| |
|
|
|
|
| cannot reborrow mutably
|
2017-07-05 16:58:22 +00:00
|
|
|
| try removing `&mut` here
|
2016-11-02 06:15:02 +00:00
|
|
|
|
2018-09-12 01:35:08 +00:00
|
|
|
warning: function cannot return without recursing
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/issue-31424.rs:12:5
|
2018-09-12 01:35:08 +00:00
|
|
|
|
|
|
|
|
LL | fn bar(self: &mut Self) {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
|
2019-03-09 12:03:44 +00:00
|
|
|
LL |
|
|
|
|
LL | (&mut self).bar();
|
2018-09-12 01:35:08 +00:00
|
|
|
| ----------------- recursive call site
|
|
|
|
|
|
|
|
|
= note: #[warn(unconditional_recursion)] on by default
|
|
|
|
= help: a `loop` may express intention better if this is on purpose
|
|
|
|
|
2017-05-27 17:58:52 +00:00
|
|
|
error[E0596]: cannot borrow immutable argument `self` as mutable
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/issue-31424.rs:14:15
|
2016-11-02 06:15:02 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | (&mut self).bar();
|
2016-11-02 06:15:02 +00:00
|
|
|
| ^^^^ cannot borrow mutably
|
2018-05-25 18:33:15 +00:00
|
|
|
help: consider removing the `&mut`, as it is an immutable binding to a mutable reference
|
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | self.bar();
|
2018-05-25 18:33:15 +00:00
|
|
|
| ^^^^
|
2016-11-02 06:15:02 +00:00
|
|
|
|
2017-07-02 10:49:30 +00:00
|
|
|
error: aborting due to 2 previous errors
|
2016-11-02 06:15:02 +00:00
|
|
|
|
2018-03-03 14:59:40 +00:00
|
|
|
For more information about this error, try `rustc --explain E0596`.
|