1 fn array() -> [(String, String); 3] {
5 // Const Index + Const Index
7 fn move_out_from_begin_and_end() {
10 let [.., ref _y] = a; //~ ERROR [E0382]
13 fn move_out_from_begin_field_and_end() {
15 let [_, _, (_x, _)] = a;
16 let [.., ref _y] = a; //~ ERROR [E0382]
19 fn move_out_from_begin_field_and_end_field() {
21 let [_, _, (_x, _)] = a;
22 let [.., (ref _y, _)] = a; //~ ERROR [E0382]
25 // Const Index + Slice
27 fn move_out_by_const_index_and_subslice() {
30 let [ref _y @ .., _, _] = a; //~ ERROR [E0382]
33 fn move_out_by_const_index_end_and_subslice() {
36 let [_, _, ref _y @ ..] = a; //~ ERROR [E0382]
39 fn move_out_by_const_index_field_and_subslice() {
41 let [(_x, _), _, _] = a;
42 let [ref _y @ .., _, _] = a; //~ ERROR [E0382]
45 fn move_out_by_const_index_end_field_and_subslice() {
47 let [.., (_x, _)] = a;
48 let [_, _, ref _y @ ..] = a; //~ ERROR [E0382]
51 fn move_out_by_subslice_and_const_index_field() {
53 let [_y @ .., _, _] = a;
54 let [(ref _x, _), _, _] = a; //~ ERROR [E0382]
57 fn move_out_by_subslice_and_const_index_end_field() {
59 let [_, _, _y @ ..] = a;
60 let [.., (ref _x, _)] = a; //~ ERROR [E0382]
65 fn move_out_by_subslice_and_subslice() {
68 let [_, ref _y @ ..] = a; //~ ERROR [E0382]
73 fn move_out_and_assign_end() {
76 a[2] = Default::default(); //~ ERROR [E0382]
79 fn move_out_and_assign_end_field() {
81 let [_, _, (_x, _)] = a;
82 a[2].1 = Default::default(); //~ ERROR [E0382]
85 fn move_out_slice_and_assign_end() {
87 let [_, _, _x @ ..] = a;
88 a[0] = Default::default(); //~ ERROR [E0382]
91 fn move_out_slice_and_assign_end_field() {
93 let [_, _, _x @ ..] = a;
94 a[0].1 = Default::default(); //~ ERROR [E0382]