27 lines
818 B
Plaintext
27 lines
818 B
Plaintext
|
error: cannot borrow immutable borrowed content `*a` as mutable
|
||
|
--> $DIR/mut-arg-hint.rs:13:9
|
||
|
|
|
||
|
12 | fn foo(mut a: &String) {
|
||
|
| ------- use `&mut String` here to make mutable
|
||
|
13 | a.push_str("bar");
|
||
|
| ^
|
||
|
|
||
|
error: cannot borrow immutable borrowed content `*a` as mutable
|
||
|
--> $DIR/mut-arg-hint.rs:18:5
|
||
|
|
|
||
|
17 | pub fn foo<'a>(mut a: &'a String) {
|
||
|
| ---------- use `&'a mut String` here to make mutable
|
||
|
18 | a.push_str("foo");
|
||
|
| ^
|
||
|
|
||
|
error: cannot borrow immutable borrowed content `*a` as mutable
|
||
|
--> $DIR/mut-arg-hint.rs:25:9
|
||
|
|
|
||
|
24 | pub fn foo(mut a: &String) {
|
||
|
| ------- use `&mut String` here to make mutable
|
||
|
25 | a.push_str("foo");
|
||
|
| ^
|
||
|
|
||
|
error: aborting due to 3 previous errors
|
||
|
|