2 fn foo(mut a: &String) {
3 a.push_str("bar"); //~ ERROR cannot borrow `*a` as mutable, as it is behind a `&` reference
7 pub fn foo<'a>(mut a: &'a String) {
8 a.push_str("foo"); //~ ERROR cannot borrow `*a` as mutable, as it is behind a `&` reference
14 pub fn foo(mut a: &String) {
15 a.push_str("foo"); //~ ERROR cannot borrow `*a` as mutable, as it is behind a `&` reference
20 foo(&"a".to_string());
21 A::foo(&"a".to_string());