rust/tests/ui/nll/loan_ends_mid_block_vec.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 lines
1.2 KiB
Plaintext
Raw Normal View History

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');
| ^^^^ second mutable borrow occurs here
2018-08-08 07:28:26 -05:00
...
LL | capitalize(slice);
| ----- 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');
| ^^^^ second mutable borrow occurs here
2018-08-08 07:28:26 -05:00
...
LL | capitalize(slice);
| ----- 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');
| ^^^^ 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);
| ----- 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`.