1 error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable
2 --> $DIR/issue-51191.rs:17:9
4 LL | (&mut self).bar();
7 | cannot borrow as mutable
8 | try removing `&mut` here
10 error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable
11 --> $DIR/issue-51191.rs:22:9
14 | ---- help: consider changing this to be mutable: `mut self`
15 LL | (&mut self).bar();
16 | ^^^^^^^^^^^ cannot borrow as mutable
18 error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable
19 --> $DIR/issue-51191.rs:31:9
21 LL | (&mut self).bar();
22 | ^^^^^^^^^^^ cannot borrow as mutable
24 error[E0596]: cannot borrow data in a `&` reference as mutable
25 --> $DIR/issue-51191.rs:31:9
27 LL | (&mut self).bar();
28 | ^^^^^^^^^^^ cannot borrow as mutable
30 error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable
31 --> $DIR/issue-51191.rs:37:9
33 LL | (&mut self).bar();
36 | cannot borrow as mutable
37 | try removing `&mut` here
39 error: aborting due to 5 previous errors
41 For more information about this error, try `rustc --explain E0596`.