os-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
506 B
Text
Raw Normal View History

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
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`.