]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/building/uniform_array_move_out.rs
Rollup merge of #107473 - rustbot:docs-update, r=ehuss
[rust.git] / tests / mir-opt / building / uniform_array_move_out.rs
1 #![feature(box_syntax)]
2
3 // EMIT_MIR uniform_array_move_out.move_out_from_end.built.after.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.built.after.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 }