]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/suggest-split-at-mut.stderr
Rollup merge of #106638 - RalfJung:realstd, r=thomcc
[rust.git] / tests / ui / suggestions / suggest-split-at-mut.stderr
1 error[E0499]: cannot borrow `foo[_]` as mutable more than once at a time
2   --> $DIR/suggest-split-at-mut.rs:4:13
3    |
4 LL |     let a = &mut foo[2];
5    |             ----------- first mutable borrow occurs here
6 LL |     let b = &mut foo[3];
7    |             ^^^^^^^^^^^ second mutable borrow occurs here
8 LL |     *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
13 error: aborting due to previous error
14
15 For more information about this error, try `rustc --explain E0499`.