diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2024-04-24 21:53:33 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2024-04-25 16:55:33 +0000 |
| commit | abdb64d4eaa989ff5ef96099f6e1585472de1622 (patch) | |
| tree | e541fcebf6f57736ea9bf4c0681c2f0c6bb22d4c /tests | |
| parent | ad6ae612462c77fa6c5d1c98df9f197c570e0e81 (diff) | |
| download | rust-abdb64d4eaa989ff5ef96099f6e1585472de1622.tar.gz rust-abdb64d4eaa989ff5ef96099f6e1585472de1622.zip | |
Check equivalence of indices in more cases
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/suggestions/suggest-split-at-mut.stderr | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/ui/suggestions/suggest-split-at-mut.stderr b/tests/ui/suggestions/suggest-split-at-mut.stderr index c1d93367ccb..4502ec1f393 100644 --- a/tests/ui/suggestions/suggest-split-at-mut.stderr +++ b/tests/ui/suggestions/suggest-split-at-mut.stderr @@ -8,8 +8,7 @@ LL | let b = &mut foo[3]; LL | *a = 5; | ------ first borrow later used here | - = help: consider using `.split_at_mut(position)` or similar method to obtain two mutable non-overlapping sub-slices - = help: consider using `.swap(index_1, index_2)` to swap elements at the specified indices + = help: use `.split_at_mut(position)` to obtain two mutable non-overlapping sub-slices error[E0499]: cannot borrow `foo` as mutable more than once at a time --> $DIR/suggest-split-at-mut.rs:13:18 @@ -59,8 +58,7 @@ LL | *b = 6; LL | println!("{:?} {:?}", a, b); | - immutable borrow later used here | - = help: consider using `.split_at_mut(position)` or similar method to obtain two mutable non-overlapping sub-slices - = help: consider using `.swap(index_1, index_2)` to swap elements at the specified indices + = help: use `.split_at_mut(position)` to obtain two mutable non-overlapping sub-slices error[E0502]: cannot borrow `foo[_]` as immutable because it is also borrowed as mutable --> $DIR/suggest-split-at-mut.rs:46:13 @@ -72,8 +70,7 @@ LL | let b = &foo[2]; LL | *a = 5; | ------ mutable borrow later used here | - = help: consider using `.split_at_mut(position)` or similar method to obtain two mutable non-overlapping sub-slices - = help: consider using `.swap(index_1, index_2)` to swap elements at the specified indices + = help: use `.split_at_mut(position)` to obtain two mutable non-overlapping sub-slices error[E0502]: cannot borrow `foo` as immutable because it is also borrowed as mutable --> $DIR/suggest-split-at-mut.rs:54:14 |
