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