rust/src/test/ui/span/mut-arg-hint.stderr
Vadim Petrochenkov fa72a81bea Update tests
2019-03-11 23:10:26 +03:00

28 lines
980 B
Plaintext

error[E0596]: cannot borrow immutable borrowed content `*a` as mutable
--> $DIR/mut-arg-hint.rs:3:9
|
LL | fn foo(mut a: &String) {
| ------- use `&mut String` here to make mutable
LL | a.push_str("bar");
| ^ cannot borrow as mutable
error[E0596]: cannot borrow immutable borrowed content `*a` as mutable
--> $DIR/mut-arg-hint.rs:8:5
|
LL | pub fn foo<'a>(mut a: &'a String) {
| ---------- use `&'a mut String` here to make mutable
LL | a.push_str("foo");
| ^ cannot borrow as mutable
error[E0596]: cannot borrow immutable borrowed content `*a` as mutable
--> $DIR/mut-arg-hint.rs:15:9
|
LL | pub fn foo(mut a: &String) {
| ------- use `&mut String` here to make mutable
LL | a.push_str("foo");
| ^ cannot borrow as mutable
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0596`.