2017-05-27 12:58:52 -05:00
|
|
|
error[E0596]: cannot borrow immutable borrowed content `*a` as mutable
|
2016-12-03 20:21:06 -06:00
|
|
|
--> $DIR/mut-arg-hint.rs:13:9
|
|
|
|
|
|
|
|
|
12 | fn foo(mut a: &String) {
|
|
|
|
| ------- use `&mut String` here to make mutable
|
2017-11-20 06:13:27 -06:00
|
|
|
13 | a.push_str("bar"); //~ ERROR cannot borrow immutable borrowed content
|
2017-01-17 01:42:11 -06:00
|
|
|
| ^ cannot borrow as mutable
|
2016-12-03 20:21:06 -06:00
|
|
|
|
2017-05-27 12:58:52 -05:00
|
|
|
error[E0596]: cannot borrow immutable borrowed content `*a` as mutable
|
2017-02-20 20:18:16 -06:00
|
|
|
--> $DIR/mut-arg-hint.rs:18:5
|
|
|
|
|
|
|
|
|
17 | pub fn foo<'a>(mut a: &'a String) {
|
|
|
|
| ---------- use `&'a mut String` here to make mutable
|
2017-11-20 06:13:27 -06:00
|
|
|
18 | a.push_str("foo"); //~ ERROR cannot borrow immutable borrowed content
|
2017-02-20 20:18:16 -06:00
|
|
|
| ^ cannot borrow as mutable
|
|
|
|
|
2017-05-27 12:58:52 -05:00
|
|
|
error[E0596]: cannot borrow immutable borrowed content `*a` as mutable
|
2016-11-08 00:21:53 -06:00
|
|
|
--> $DIR/mut-arg-hint.rs:25:9
|
|
|
|
|
|
|
|
|
24 | pub fn foo(mut a: &String) {
|
|
|
|
| ------- use `&mut String` here to make mutable
|
2017-11-20 06:13:27 -06:00
|
|
|
25 | a.push_str("foo"); //~ ERROR cannot borrow immutable borrowed content
|
2017-01-17 01:42:11 -06:00
|
|
|
| ^ cannot borrow as mutable
|
2016-11-08 00:21:53 -06:00
|
|
|
|
2017-07-02 05:49:30 -05:00
|
|
|
error: aborting due to 3 previous errors
|
2016-11-08 00:21:53 -06:00
|
|
|
|
2018-02-19 14:40:25 -06:00
|
|
|
If you want more information on this error, try using "rustc --explain E0596"
|