fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
691 B16 linesraw
1error[E0499]: cannot borrow `foo[_]` as mutable more than once at a time
2  --> $DIR/suggest-split-at-mut.rs:4:13
3   |
4LL |     let a = &mut foo[2];
5   |             ----------- first mutable borrow occurs here
6LL |     let b = &mut foo[3];
7   |             ^^^^^^^^^^^ second mutable borrow occurs here
8LL |     *a = 5;
9   |     ------ first borrow later used here
10   |
11   = help: consider using `.split_at_mut(position)` or similar method to obtain two mutable non-overlapping sub-slices
12   = help: consider using `.swap(index_1, index_2)` to swap elements at the specified indices
13
14error: aborting due to previous error
15
16For more information about this error, try `rustc --explain E0499`.