Open
Description
#![feature(nll)]
fn main() {
let mut x = [1, 2];
x.split_at_mut(x.len() / 2);
}
error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable
--> src/main.rs:4:20
|
4 | x.split_at_mut(x.len() / 2);
| ---------------^-----------
| | |
| | immutable borrow occurs here
| mutable borrow occurs here
| borrow later used here
1.30.0-nightly (2018-08-24 d41f21f)