2019-04-22 08:40:08 +01:00
|
|
|
error[E0596]: cannot borrow `*self.s` as mutable, as it is behind a `&` reference
|
2021-12-04 18:57:31 +11:00
|
|
|
--> $DIR/issue-38147-2.rs:9:9
|
2017-01-16 23:42:11 -08:00
|
|
|
|
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | self.s.push('x');
|
2023-06-22 20:30:23 +00:00
|
|
|
| ^^^^^^ cannot borrow as mutable
|
2021-12-04 18:57:31 +11:00
|
|
|
|
|
|
|
|
help: consider changing this to be mutable
|
|
|
|
|
|
|
|
|
LL | s: &'a mut String,
|
|
|
|
| +++
|
|
|
|
|
|
|
|
error[E0596]: cannot borrow `*self.longer_name` as mutable, as it is behind a `&` reference
|
|
|
|
--> $DIR/issue-38147-2.rs:12:9
|
|
|
|
|
|
|
|
|
LL | self.longer_name.push(13);
|
2023-06-22 20:30:23 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^ cannot borrow as mutable
|
2021-12-04 18:57:31 +11:00
|
|
|
|
|
|
|
|
help: consider changing this to be mutable
|
|
|
|
|
|
2021-12-18 12:57:55 +11:00
|
|
|
LL | longer_name: & 'a mut Vec<u8>
|
2021-12-04 18:57:31 +11:00
|
|
|
| +++
|
2017-01-16 23:42:11 -08:00
|
|
|
|
2021-12-04 18:57:31 +11:00
|
|
|
error: aborting due to 2 previous errors
|
2017-01-16 23:42:11 -08:00
|
|
|
|
2018-03-03 15:59:40 +01:00
|
|
|
For more information about this error, try `rustc --explain E0596`.
|