2019-05-02 18:34:15 -04:00
|
|
|
error[E0506]: cannot assign to `data.0` because it is borrowed
|
|
|
|
--> $DIR/loan_ends_mid_block_pair.rs:12:5
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
|
LL | let c = &mut data.0;
|
2023-01-15 03:06:44 +00:00
|
|
|
| ----------- `data.0` is borrowed here
|
2018-08-08 14:28:26 +02:00
|
|
|
LL | capitalize(c);
|
|
|
|
LL | data.0 = 'e';
|
2023-01-15 03:06:44 +00:00
|
|
|
| ^^^^^^^^^^^^ `data.0` is assigned to here but it was already borrowed
|
2018-08-08 14:28:26 +02:00
|
|
|
...
|
|
|
|
LL | capitalize(c);
|
|
|
|
| - borrow later used here
|
|
|
|
|
2023-11-21 15:44:16 +00:00
|
|
|
error: aborting due to 1 previous error
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0506`.
|