2019-05-02 17:34:15 -05:00
|
|
|
error[E0499]: cannot borrow `data` as mutable more than once at a time
|
|
|
|
--> $DIR/loan_ends_mid_block_vec.rs:11:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let slice = &mut data;
|
|
|
|
| --------- first mutable borrow occurs here
|
|
|
|
LL | capitalize(slice);
|
|
|
|
LL | data.push('d');
|
2023-06-22 15:30:23 -05:00
|
|
|
| ^^^^ second mutable borrow occurs here
|
2018-08-08 07:28:26 -05:00
|
|
|
...
|
|
|
|
LL | capitalize(slice);
|
2018-09-29 05:47:47 -05:00
|
|
|
| ----- first borrow later used here
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2019-05-02 17:34:15 -05:00
|
|
|
error[E0499]: cannot borrow `data` as mutable more than once at a time
|
|
|
|
--> $DIR/loan_ends_mid_block_vec.rs:13:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let slice = &mut data;
|
|
|
|
| --------- first mutable borrow occurs here
|
|
|
|
...
|
|
|
|
LL | data.push('e');
|
2023-06-22 15:30:23 -05:00
|
|
|
| ^^^^ second mutable borrow occurs here
|
2018-08-08 07:28:26 -05:00
|
|
|
...
|
|
|
|
LL | capitalize(slice);
|
2018-09-29 05:47:47 -05:00
|
|
|
| ----- first borrow later used here
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2019-05-02 17:34:15 -05:00
|
|
|
error[E0499]: cannot borrow `data` as mutable more than once at a time
|
|
|
|
--> $DIR/loan_ends_mid_block_vec.rs:15:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let slice = &mut data;
|
|
|
|
| --------- first mutable borrow occurs here
|
|
|
|
...
|
|
|
|
LL | data.push('f');
|
2023-06-22 15:30:23 -05:00
|
|
|
| ^^^^ second mutable borrow occurs here
|
2019-05-02 17:34:15 -05:00
|
|
|
LL |
|
2018-08-08 07:28:26 -05:00
|
|
|
LL | capitalize(slice);
|
2018-09-29 05:47:47 -05:00
|
|
|
| ----- first borrow later used here
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2019-05-02 17:34:15 -05:00
|
|
|
error: aborting due to 3 previous errors
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0499`.
|