Skip to content

Commit 9410104

Browse files
committed
Bless output of test nll/loan_ends_mid_block_pair.rs for Polonius
1 parent 2824db1 commit 9410104

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
error[E0506]: cannot assign to `data.0` because it is borrowed
2+
--> $DIR/loan_ends_mid_block_pair.rs:12:5
3+
|
4+
LL | let c = &mut data.0;
5+
| ----------- borrow of `data.0` occurs here
6+
LL | capitalize(c);
7+
LL | data.0 = 'e';
8+
| ^^^^^^^^^^^^ assignment to borrowed `data.0` occurs here
9+
...
10+
LL | capitalize(c);
11+
| - borrow later used here
12+
13+
error[E0506]: cannot assign to `data.0` because it is borrowed
14+
--> $DIR/loan_ends_mid_block_pair.rs:14:5
15+
|
16+
LL | let c = &mut data.0;
17+
| ----------- borrow of `data.0` occurs here
18+
...
19+
LL | data.0 = 'f';
20+
| ^^^^^^^^^^^^ assignment to borrowed `data.0` occurs here
21+
LL | data.0 = 'g';
22+
LL | capitalize(c);
23+
| - borrow later used here
24+
25+
error[E0506]: cannot assign to `data.0` because it is borrowed
26+
--> $DIR/loan_ends_mid_block_pair.rs:15:5
27+
|
28+
LL | let c = &mut data.0;
29+
| ----------- borrow of `data.0` occurs here
30+
...
31+
LL | data.0 = 'g';
32+
| ^^^^^^^^^^^^ assignment to borrowed `data.0` occurs here
33+
LL | capitalize(c);
34+
| - borrow later used here
35+
36+
error: aborting due to 3 previous errors
37+
38+
For more information about this error, try `rustc --explain E0506`.

0 commit comments

Comments
 (0)