]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/uniform_array_move_out.rs
Add regression test for #64319 back in.
[rust.git] / src / test / mir-opt / uniform_array_move_out.rs
1 #![feature(box_syntax)]
2
3 fn move_out_from_end() {
4     let a = [box 1, box 2];
5     let [.., _y] = a;
6 }
7
8 fn move_out_by_subslice() {
9     let a = [box 1, box 2];
10     let [_y @ ..] = a;
11 }
12
13 fn main() {
14     move_out_by_subslice();
15     move_out_from_end();
16 }
17
18 // END RUST SOURCE
19
20 // START rustc.move_out_from_end.mir_map.0.mir
21 //      _6 = move _1[1 of 2];
22 //      _0 = ();
23 // END rustc.move_out_from_end.mir_map.0.mir
24
25 // START rustc.move_out_by_subslice.mir_map.0.mir
26 //     _6 = move _1[0..2];
27 //     _0 = ();
28 // END rustc.move_out_by_subslice.mir_map.0.mir