diff options
Diffstat (limited to 'tests/ui/borrowck/borrowck-move-out-from-array-use-no-overlap-match.rs')
-rw-r--r-- | tests/ui/borrowck/borrowck-move-out-from-array-use-no-overlap-match.rs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/tests/ui/borrowck/borrowck-move-out-from-array-use-no-overlap-match.rs b/tests/ui/borrowck/borrowck-move-out-from-array-use-no-overlap-match.rs index 017ca90b8..2f6ce430b 100644 --- a/tests/ui/borrowck/borrowck-move-out-from-array-use-no-overlap-match.rs +++ b/tests/ui/borrowck/borrowck-move-out-from-array-use-no-overlap-match.rs @@ -1,3 +1,4 @@ +// check-pass // Due to #53114, which causes a "read" of the `_` patterns, // the borrow-checker refuses this code, while it should probably be allowed. // Once the bug is fixed, the test, which is derived from a @@ -15,7 +16,6 @@ fn move_out_from_begin_and_one_from_end() { [_, _, _x] => {} } match a { - //~^ ERROR use of partially moved value [.., ref _y, _] => {} } } @@ -26,7 +26,6 @@ fn move_out_from_begin_field_and_end_field() { [_, _, (_x, _)] => {} } match a { - //~^ ERROR use of partially moved value [.., (_, ref _y)] => {} } } @@ -39,7 +38,6 @@ fn move_out_by_const_index_and_subslice() { [_x, _, _] => {} } match a { - //~^ ERROR use of partially moved value [_, ref _y @ ..] => {} } } @@ -50,7 +48,6 @@ fn move_out_by_const_index_end_and_subslice() { [.., _x] => {} } match a { - //~^ ERROR use of partially moved value [ref _y @ .., _] => {} } } @@ -61,7 +58,6 @@ fn move_out_by_const_index_field_and_subslice() { [(_x, _), _, _] => {} } match a { - //~^ ERROR use of partially moved value [_, ref _y @ ..] => {} } } @@ -72,7 +68,6 @@ fn move_out_by_const_index_end_field_and_subslice() { [.., (_x, _)] => {} } match a { - //~^ ERROR use of partially moved value [ref _y @ .., _] => {} } } @@ -83,7 +78,6 @@ fn move_out_by_const_subslice_and_index_field() { [_, _y @ ..] => {} } match a { - //~^ ERROR use of partially moved value [(ref _x, _), _, _] => {} } } @@ -94,7 +88,6 @@ fn move_out_by_const_subslice_and_end_index_field() { [_y @ .., _] => {} } match a { - //~^ ERROR use of partially moved value [.., (ref _x, _)] => {} } } @@ -107,7 +100,6 @@ fn move_out_by_subslice_and_subslice() { [x @ .., _, _] => {} } match a { - //~^ ERROR use of partially moved value [_, ref _y @ ..] => {} } } |