1 error[E0596]: cannot borrow `*a` as mutable, as it is behind a `&` reference
2 --> $DIR/mut-arg-hint.rs:3:9
4 LL | a.push_str("bar");
5 | ^^^^^^^^^^^^^^^^^ `a` is a `&` reference, so the data it refers to cannot be borrowed as mutable
7 help: consider changing this to be a mutable reference
9 LL | fn foo(mut a: &mut String) {
12 error[E0596]: cannot borrow `*a` as mutable, as it is behind a `&` reference
13 --> $DIR/mut-arg-hint.rs:8:5
15 LL | a.push_str("foo");
16 | ^^^^^^^^^^^^^^^^^ `a` is a `&` reference, so the data it refers to cannot be borrowed as mutable
18 help: consider changing this to be a mutable reference
20 LL | pub fn foo<'a>(mut a: &'a mut String) {
23 error[E0596]: cannot borrow `*a` as mutable, as it is behind a `&` reference
24 --> $DIR/mut-arg-hint.rs:15:9
26 LL | a.push_str("foo");
27 | ^^^^^^^^^^^^^^^^^ `a` is a `&` reference, so the data it refers to cannot be borrowed as mutable
29 help: consider changing this to be a mutable reference
31 LL | pub fn foo(mut a: &mut String) {
34 error: aborting due to 3 previous errors
36 For more information about this error, try `rustc --explain E0596`.