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