]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/issue-51191.stderr
Rollup merge of #103146 - joboet:cleanup_pthread_condvar, r=Mark-Simulacrum
[rust.git] / src / test / ui / nll / issue-51191.stderr
1 warning: function cannot return without recursing
2   --> $DIR/issue-51191.rs:4:5
3    |
4 LL |     fn bar(self: &mut Self) {
5    |     ^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
6 ...
7 LL |         (&mut self).bar();
8    |         ----------------- recursive call site
9    |
10    = help: a `loop` may express intention better if this is on purpose
11    = note: `#[warn(unconditional_recursion)]` on by default
12
13 error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable
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
26    |
27 LL |         (&mut self).bar();
28    |         ^^^^^^^^^^^
29
30 error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable
31   --> $DIR/issue-51191.rs:13:9
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
39   --> $DIR/issue-51191.rs:22:9
40    |
41 LL |         (&mut self).bar();
42    |         ^^^^^^^^^^^ cannot borrow as mutable
43
44 error[E0596]: cannot borrow data in a `&` reference as mutable
45   --> $DIR/issue-51191.rs:22:9
46    |
47 LL |         (&mut self).bar();
48    |         ^^^^^^^^^^^^^^^^^ cannot borrow as mutable
49
50 error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable
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
63    |
64 LL |         (&mut self).bar();
65    |         ^^^^^^^^^^^
66
67 error: aborting due to 5 previous errors; 1 warning emitted
68
69 For more information about this error, try `rustc --explain E0596`.