rust/src/test/ui/nll/loan_ends_mid_block_pair.stderr

70 lines
2.3 KiB
Plaintext
Raw Normal View History

2018-08-08 07:28:26 -05:00
error[E0506]: cannot assign to `data.0` because it is borrowed (Ast)
2018-12-25 09:56:47 -06:00
--> $DIR/loan_ends_mid_block_pair.rs:14:5
2018-08-08 07:28:26 -05:00
|
LL | let c = &mut data.0;
| ------ borrow of `data.0` occurs here
LL | capitalize(c);
LL | data.0 = 'e';
| ^^^^^^^^^^^^ assignment to borrowed `data.0` occurs here
error[E0506]: cannot assign to `data.0` because it is borrowed (Ast)
2018-12-25 09:56:47 -06:00
--> $DIR/loan_ends_mid_block_pair.rs:17:5
2018-08-08 07:28:26 -05:00
|
LL | let c = &mut data.0;
| ------ borrow of `data.0` occurs here
...
LL | data.0 = 'f';
| ^^^^^^^^^^^^ assignment to borrowed `data.0` occurs here
error[E0506]: cannot assign to `data.0` because it is borrowed (Ast)
2018-12-25 09:56:47 -06:00
--> $DIR/loan_ends_mid_block_pair.rs:19:5
2018-08-08 07:28:26 -05:00
|
LL | let c = &mut data.0;
| ------ borrow of `data.0` occurs here
...
LL | data.0 = 'g';
| ^^^^^^^^^^^^ assignment to borrowed `data.0` occurs here
error[E0506]: cannot assign to `data.0` because it is borrowed (Ast)
2018-12-25 09:56:47 -06:00
--> $DIR/loan_ends_mid_block_pair.rs:28:5
2018-08-08 07:28:26 -05:00
|
LL | let c = &mut data.0;
| ------ borrow of `data.0` occurs here
LL | capitalize(c);
LL | data.0 = 'e';
| ^^^^^^^^^^^^ assignment to borrowed `data.0` occurs here
error[E0506]: cannot assign to `data.0` because it is borrowed (Ast)
2018-12-25 09:56:47 -06:00
--> $DIR/loan_ends_mid_block_pair.rs:30:5
2018-08-08 07:28:26 -05:00
|
LL | let c = &mut data.0;
| ------ borrow of `data.0` occurs here
...
LL | data.0 = 'f';
| ^^^^^^^^^^^^ assignment to borrowed `data.0` occurs here
error[E0506]: cannot assign to `data.0` because it is borrowed (Ast)
2018-12-25 09:56:47 -06:00
--> $DIR/loan_ends_mid_block_pair.rs:32:5
2018-08-08 07:28:26 -05:00
|
LL | let c = &mut data.0;
| ------ borrow of `data.0` occurs here
...
LL | data.0 = 'g';
| ^^^^^^^^^^^^ assignment to borrowed `data.0` occurs here
error[E0506]: cannot assign to `data.0` because it is borrowed (Mir)
2018-12-25 09:56:47 -06:00
--> $DIR/loan_ends_mid_block_pair.rs:14:5
2018-08-08 07:28:26 -05:00
|
LL | let c = &mut data.0;
| ----------- borrow of `data.0` occurs here
LL | capitalize(c);
LL | data.0 = 'e';
| ^^^^^^^^^^^^ assignment to borrowed `data.0` occurs here
...
LL | capitalize(c);
| - borrow later used here
error: aborting due to 7 previous errors
2018-08-08 07:28:26 -05:00
For more information about this error, try `rustc --explain E0506`.