fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1warning: function cannot return without recursing 2 --> $DIR/issue-51191.rs:4:5 3 | 4LL | fn bar(self: &mut Self) { 5 | ^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing 6... 7LL | (&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 13error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable 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 26 | 27LL | (&mut self).bar(); 28 | ^^^^^^^^^^^ 29 30error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable 31 --> $DIR/issue-51191.rs:13:9 32 | 33LL | (&mut self).bar(); 34 | ^^^^^^^^^^^ cannot borrow as mutable 35 | 36help: consider changing this to be mutable 37 | 38LL | fn imm(mut self) { 39 | +++ 40 41error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable 42 --> $DIR/issue-51191.rs:22:9 43 | 44LL | (&mut self).bar(); 45 | ^^^^^^^^^^^ cannot borrow as mutable 46 47error[E0596]: cannot borrow data in a `&` reference as mutable 48 --> $DIR/issue-51191.rs:22:9 49 | 50LL | (&mut self).bar(); 51 | ^^^^^^^^^^^ cannot borrow as mutable 52 53error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable 54 --> $DIR/issue-51191.rs:28:9 55 | 56LL | (&mut self).bar(); 57 | ^^^^^^^^^^^ cannot borrow as mutable 58 | 59note: the binding is already a mutable borrow 60 --> $DIR/issue-51191.rs:27:16 61 | 62LL | fn mtblref(&mut self) { 63 | ^^^^^^^^^ 64help: try removing `&mut` here 65 --> $DIR/issue-51191.rs:28:9 66 | 67LL | (&mut self).bar(); 68 | ^^^^^^^^^^^ 69 70error: aborting due to 5 previous errors; 1 warning emitted 71 72For more information about this error, try `rustc --explain E0596`.