1 fn array() -> [(String, String); 3] {
5 // Const Index + Const Index
7 fn move_out_from_begin_and_end() {
13 [.., ref _y] => {} //~ ERROR [E0382]
17 fn move_out_from_begin_field_and_end() {
23 [.., ref _y] => {} //~ ERROR [E0382]
27 fn move_out_from_begin_field_and_end_field() {
33 [.., (ref _y, _)] => {} //~ ERROR [E0382]
37 // Const Index + Slice
39 fn move_out_by_const_index_and_subslice() {
46 [ref _y @ .., _, _] => {}
50 fn move_out_by_const_index_end_and_subslice() {
57 [_, _, ref _y @ ..] => {}
61 fn move_out_by_const_index_field_and_subslice() {
68 [ref _y @ .., _, _] => {}
72 fn move_out_by_const_index_end_field_and_subslice() {
79 [_, _, ref _y @ ..] => {}
83 fn move_out_by_subslice_and_const_index_field() {
89 [(ref _x, _), _, _] => {} //~ ERROR [E0382]
93 fn move_out_by_subslice_and_const_index_end_field() {
99 [.., (ref _x, _)] => {} //~ ERROR [E0382]
105 fn move_out_by_subslice_and_subslice() {
112 [_, ref _y @ ..] => {}
118 fn move_out_and_assign_end() {
123 a[2] = Default::default(); //~ ERROR [E0382]
126 fn move_out_and_assign_end_field() {
129 [_, _, (_x, _)] => {}
131 a[2].1 = Default::default(); //~ ERROR [E0382]
134 fn move_out_slice_and_assign_end() {
137 [_, _, _x @ ..] => {}
139 a[0] = Default::default(); //~ ERROR [E0382]
142 fn move_out_slice_and_assign_end_field() {
145 [_, _, _x @ ..] => {}
147 a[0].1 = Default::default(); //~ ERROR [E0382]