error[E0499]: cannot borrow `data` as mutable more than once at a time --> $DIR/loan_ends_mid_block_vec.rs:11:5 | LL | let slice = &mut data; | --------- first mutable borrow occurs here LL | capitalize(slice); LL | data.push('d'); | ^^^^ second mutable borrow occurs here ... LL | capitalize(slice); | ----- first borrow later used here error[E0499]: cannot borrow `data` as mutable more than once at a time --> $DIR/loan_ends_mid_block_vec.rs:13:5 | LL | let slice = &mut data; | --------- first mutable borrow occurs here ... LL | data.push('e'); | ^^^^ second mutable borrow occurs here ... LL | capitalize(slice); | ----- first borrow later used here error[E0499]: cannot borrow `data` as mutable more than once at a time --> $DIR/loan_ends_mid_block_vec.rs:15:5 | LL | let slice = &mut data; | --------- first mutable borrow occurs here ... LL | data.push('f'); | ^^^^ second mutable borrow occurs here LL | LL | capitalize(slice); | ----- first borrow later used here error: aborting due to 3 previous errors For more information about this error, try `rustc --explain E0499`.