1 error[E0499]: cannot borrow `data` as mutable more than once at a time
2 --> $DIR/loan_ends_mid_block_vec.rs:11:5
4 LL | let slice = &mut data;
5 | --------- first mutable borrow occurs here
6 LL | capitalize(slice);
8 | ^^^^^^^^^^^^^^ second mutable borrow occurs here
10 LL | capitalize(slice);
11 | ----- first borrow later used here
13 error[E0499]: cannot borrow `data` as mutable more than once at a time
14 --> $DIR/loan_ends_mid_block_vec.rs:13:5
16 LL | let slice = &mut data;
17 | --------- first mutable borrow occurs here
20 | ^^^^^^^^^^^^^^ second mutable borrow occurs here
22 LL | capitalize(slice);
23 | ----- first borrow later used here
25 error[E0499]: cannot borrow `data` as mutable more than once at a time
26 --> $DIR/loan_ends_mid_block_vec.rs:15:5
28 LL | let slice = &mut data;
29 | --------- first mutable borrow occurs here
32 | ^^^^^^^^^^^^^^ second mutable borrow occurs here
34 LL | capitalize(slice);
35 | ----- first borrow later used here
37 error: aborting due to 3 previous errors
39 For more information about this error, try `rustc --explain E0499`.