File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change
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`.
You can’t perform that action at this time.
0 commit comments