]> git.proxmox.com Git - rustc.git/blame - src/test/ui/nll/issue-51191.stderr
Update upstream source from tag 'upstream/1.31.0_beta.4+dfsg1'
[rustc.git] / src / test / ui / nll / issue-51191.stderr
CommitLineData
0bf4aa26
XL
1warning: function cannot return without recursing
2 --> $DIR/issue-51191.rs:16:5
3 |
4LL | fn bar(self: &mut Self) {
5 | ^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
6LL | //~^ WARN function cannot return without recursing
7LL | (&mut self).bar();
8 | ----------------- recursive call site
9 |
10 = note: #[warn(unconditional_recursion)] on by default
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
14 --> $DIR/issue-51191.rs:18:9
15 |
16LL | (&mut self).bar();
17 | ^^^^^^^^^^^
18 | |
19 | cannot borrow as mutable
20 | try removing `&mut` here
21
22error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable
23 --> $DIR/issue-51191.rs:23:9
24 |
25LL | fn imm(self) {
26 | ---- help: consider changing this to be mutable: `mut self`
27LL | (&mut self).bar();
28 | ^^^^^^^^^^^ cannot borrow as mutable
29
30error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable
31 --> $DIR/issue-51191.rs:32:9
32 |
33LL | (&mut self).bar();
34 | ^^^^^^^^^^^ cannot borrow as mutable
35
36error[E0596]: cannot borrow data in a `&` reference as mutable
37 --> $DIR/issue-51191.rs:32:9
38 |
39LL | (&mut self).bar();
40 | ^^^^^^^^^^^ cannot borrow as mutable
41
42error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable
43 --> $DIR/issue-51191.rs:38:9
44 |
45LL | (&mut self).bar();
46 | ^^^^^^^^^^^
47 | |
48 | cannot borrow as mutable
49 | try removing `&mut` here
50
51error: aborting due to 5 previous errors
52
53For more information about this error, try `rustc --explain E0596`.