1 #![feature(slice_patterns)]
3 fn array() -> [(String, String); 3] {
7 // Const Index + Const Index
9 fn move_out_from_begin_and_end() {
12 let [.., _y] = a; //~ ERROR [E0382]
15 fn move_out_from_begin_field_and_end() {
17 let [_, _, (_x, _)] = a;
18 let [.., _y] = a; //~ ERROR [E0382]
21 fn move_out_from_begin_field_and_end_field() {
23 let [_, _, (_x, _)] = a;
24 let [.., (_y, _)] = a; //~ ERROR [E0382]
27 // Const Index + Slice
29 fn move_out_by_const_index_and_subslice() {
32 let [_y @ .., _, _] = a; //~ ERROR [E0382]
35 fn move_out_by_const_index_end_and_subslice() {
38 let [_, _, _y @ ..] = a; //~ ERROR [E0382]
41 fn move_out_by_const_index_field_and_subslice() {
43 let [(_x, _), _, _] = a;
44 let [_y @ .., _, _] = a; //~ ERROR [E0382]
47 fn move_out_by_const_index_end_field_and_subslice() {
49 let [.., (_x, _)] = a;
50 let [_, _, _y @ ..] = a; //~ ERROR [E0382]
53 fn move_out_by_subslice_and_const_index_field() {
55 let [_y @ .., _, _] = a;
56 let [(_x, _), _, _] = a; //~ ERROR [E0382]
59 fn move_out_by_subslice_and_const_index_end_field() {
61 let [_, _, _y @ ..] = a;
62 let [.., (_x, _)] = a; //~ ERROR [E0382]
67 fn move_out_by_subslice_and_subslice() {
70 let [_, _y @ ..] = a; //~ ERROR [E0382]