]>
Commit | Line | Data |
---|---|---|
0bf4aa26 | 1 | warning: function cannot return without recursing |
48663c56 | 2 | --> $DIR/issue-51191.rs:4:5 |
0bf4aa26 XL |
3 | | |
4 | LL | fn bar(self: &mut Self) { | |
5 | | ^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing | |
94222f64 | 6 | ... |
0bf4aa26 XL |
7 | LL | (&mut self).bar(); |
8 | | ----------------- recursive call site | |
9 | | | |
0bf4aa26 | 10 | = help: a `loop` may express intention better if this is on purpose |
2b03887a | 11 | = note: `#[warn(unconditional_recursion)]` on by default |
0bf4aa26 XL |
12 | |
13 | error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable | |
94222f64 XL |
14 | --> $DIR/issue-51191.rs:7:9 |
15 | | | |
16 | LL | (&mut self).bar(); | |
17 | | ^^^^^^^^^^^ cannot borrow as mutable | |
18 | | | |
19 | note: the binding is already a mutable borrow | |
20 | --> $DIR/issue-51191.rs:4:18 | |
21 | | | |
22 | LL | fn bar(self: &mut Self) { | |
23 | | ^^^^^^^^^ | |
24 | help: try removing `&mut` here | |
25 | --> $DIR/issue-51191.rs:7:9 | |
0bf4aa26 XL |
26 | | |
27 | LL | (&mut self).bar(); | |
28 | | ^^^^^^^^^^^ | |
0bf4aa26 XL |
29 | |
30 | error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable | |
94222f64 | 31 | --> $DIR/issue-51191.rs:13:9 |
0bf4aa26 XL |
32 | | |
33 | LL | fn imm(self) { | |
34 | | ---- help: consider changing this to be mutable: `mut self` | |
35 | LL | (&mut self).bar(); | |
36 | | ^^^^^^^^^^^ cannot borrow as mutable | |
37 | ||
38 | error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable | |
94222f64 | 39 | --> $DIR/issue-51191.rs:22:9 |
0bf4aa26 XL |
40 | | |
41 | LL | (&mut self).bar(); | |
42 | | ^^^^^^^^^^^ cannot borrow as mutable | |
43 | ||
44 | error[E0596]: cannot borrow data in a `&` reference as mutable | |
94222f64 | 45 | --> $DIR/issue-51191.rs:22:9 |
0bf4aa26 XL |
46 | | |
47 | LL | (&mut self).bar(); | |
c295e0f8 | 48 | | ^^^^^^^^^^^^^^^^^ cannot borrow as mutable |
0bf4aa26 XL |
49 | |
50 | error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable | |
94222f64 XL |
51 | --> $DIR/issue-51191.rs:28:9 |
52 | | | |
53 | LL | (&mut self).bar(); | |
54 | | ^^^^^^^^^^^ cannot borrow as mutable | |
55 | | | |
56 | note: the binding is already a mutable borrow | |
57 | --> $DIR/issue-51191.rs:27:16 | |
58 | | | |
59 | LL | fn mtblref(&mut self) { | |
60 | | ^^^^^^^^^ | |
61 | help: try removing `&mut` here | |
62 | --> $DIR/issue-51191.rs:28:9 | |
0bf4aa26 XL |
63 | | |
64 | LL | (&mut self).bar(); | |
65 | | ^^^^^^^^^^^ | |
0bf4aa26 | 66 | |
ba9703b0 | 67 | error: aborting due to 5 previous errors; 1 warning emitted |
0bf4aa26 XL |
68 | |
69 | For more information about this error, try `rustc --explain E0596`. |