fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
1.0 KiB33 linesraw
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   |         ^^^^^^^^^^^
6   |         |
7   |         cannot borrow as mutable
8   |         try removing `&mut` here
9
10warning: function cannot return without recursing
11  --> $DIR/issue-31424.rs:12:5
12   |
13LL |     fn bar(self: &mut Self) {
14   |     ^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
15LL |
16LL |         (&mut self).bar();
17   |         ----------------- recursive call site
18   |
19   = note: `#[warn(unconditional_recursion)]` on by default
20   = help: a `loop` may express intention better if this is on purpose
21
22error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable
23  --> $DIR/issue-31424.rs:14:9
24   |
25LL |         (&mut self).bar();
26   |         ^^^^^^^^^^^
27   |         |
28   |         cannot borrow as mutable
29   |         try removing `&mut` here
30
31error: aborting due to 2 previous errors
32
33For more information about this error, try `rustc --explain E0596`.