]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/uniform_array_move_out.rs
Rollup merge of #99864 - klensy:bootstrap-art-dupe, r=jyn514
[rust.git] / src / test / mir-opt / uniform_array_move_out.rs
1 #![feature(box_syntax)]
2
3 // EMIT_MIR uniform_array_move_out.move_out_from_end.mir_map.0.mir
4 fn move_out_from_end() {
5     let a = [box 1, box 2];
6     let [.., _y] = a;
7 }
8
9 // EMIT_MIR uniform_array_move_out.move_out_by_subslice.mir_map.0.mir
10 fn move_out_by_subslice() {
11     let a = [box 1, box 2];
12     let [_y @ ..] = a;
13 }
14
15 fn main() {
16     move_out_by_subslice();
17     move_out_from_end();
18 }