1 // Due to #53114, which causes a "read" of the `_` patterns,
2 // the borrow-checker refuses this code, while it should probably be allowed.
3 // Once the bug is fixed, the test, which is derived from a
4 // passing test for `let` statements, should become check-pass.
6 fn array() -> [(String, String); 3] {
10 // Const Index + Const Index
12 fn move_out_from_begin_and_one_from_end() {
18 //~^ ERROR use of partially moved value
23 fn move_out_from_begin_field_and_end_field() {
29 //~^ ERROR use of partially moved value
34 // Const Index + Slice
36 fn move_out_by_const_index_and_subslice() {
42 //~^ ERROR use of partially moved value
47 fn move_out_by_const_index_end_and_subslice() {
53 //~^ ERROR use of partially moved value
58 fn move_out_by_const_index_field_and_subslice() {
64 //~^ ERROR use of partially moved value
69 fn move_out_by_const_index_end_field_and_subslice() {
75 //~^ ERROR use of partially moved value
80 fn move_out_by_const_subslice_and_index_field() {
86 //~^ ERROR use of partially moved value
91 fn move_out_by_const_subslice_and_end_index_field() {
97 //~^ ERROR use of partially moved value
104 fn move_out_by_subslice_and_subslice() {
110 //~^ ERROR use of partially moved value