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