rust/tests/ui/nll/loan_ends_mid_block_pair.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
504 B
Plaintext
Raw Normal View History

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