1 error[E0596]: cannot borrow `b` as mutable, as it is not declared as mutable
2 --> $DIR/mut-borrow-of-mut-ref.rs:4:10
4 LL | pub fn f(b: &mut i32) {
8 | ------ cannot borrow as mutable
11 | ------ cannot borrow as mutable
13 note: the binding is already a mutable borrow
14 --> $DIR/mut-borrow-of-mut-ref.rs:4:13
16 LL | pub fn f(b: &mut i32) {
18 help: try removing `&mut` here
23 help: try removing `&mut` here
29 error[E0596]: cannot borrow `b` as mutable, as it is not declared as mutable
30 --> $DIR/mut-borrow-of-mut-ref.rs:17:12
33 | ^^^^^^ cannot borrow as mutable
35 note: the binding is already a mutable borrow
36 --> $DIR/mut-borrow-of-mut-ref.rs:16:13
38 LL | pub fn g(b: &mut i32) {
40 help: try removing `&mut` here
46 error[E0596]: cannot borrow `f` as mutable, as it is not declared as mutable
47 --> $DIR/mut-borrow-of-mut-ref.rs:34:5
50 | ^^^^^^^ cannot borrow as mutable
52 help: consider making the binding mutable
54 LL | pub fn baz(mut f: &mut String) {
57 error: aborting due to 3 previous errors
59 For more information about this error, try `rustc --explain E0596`.