rust/src/test/ui/did_you_mean/issue-31424.stderr

34 lines
1.1 KiB
Plaintext
Raw Normal View History

error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable
--> $DIR/issue-31424.rs:7:9
2016-11-02 06:15:02 +00:00
|
2019-03-09 12:03:44 +00:00
LL | (&mut self).bar();
| ^^^^^^^^^^^
| |
| cannot borrow as mutable
| help: try removing `&mut` here
2016-11-02 06:15:02 +00:00
warning: function cannot return without recursing
--> $DIR/issue-31424.rs:13:5
|
LL | fn bar(self: &mut Self) {
| ^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
...
2019-03-09 12:03:44 +00:00
LL | (&mut self).bar();
| ----------------- 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 `self` as mutable, as it is not declared as mutable
--> $DIR/issue-31424.rs:16:9
2016-11-02 06:15:02 +00:00
|
2019-03-09 12:03:44 +00:00
LL | (&mut self).bar();
| ^^^^^^^^^^^
| |
| cannot borrow as mutable
| help: try removing `&mut` here
2016-11-02 06:15:02 +00:00
error: aborting due to 2 previous errors; 1 warning emitted
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`.