]>
Commit | Line | Data |
---|---|---|
353b0b11 | 1 | #![feature(stmt_expr_attributes, rustc_attrs)] |
0531ce1d | 2 | |
487cf647 | 3 | // EMIT_MIR uniform_array_move_out.move_out_from_end.built.after.mir |
0531ce1d | 4 | fn move_out_from_end() { |
353b0b11 FG |
5 | let a = [ |
6 | #[rustc_box] | |
7 | Box::new(1), | |
8 | #[rustc_box] | |
9 | Box::new(2), | |
10 | ]; | |
0531ce1d XL |
11 | let [.., _y] = a; |
12 | } | |
13 | ||
487cf647 | 14 | // EMIT_MIR uniform_array_move_out.move_out_by_subslice.built.after.mir |
0531ce1d | 15 | fn move_out_by_subslice() { |
353b0b11 FG |
16 | let a = [ |
17 | #[rustc_box] | |
18 | Box::new(1), | |
19 | #[rustc_box] | |
20 | Box::new(2), | |
21 | ]; | |
416331ca | 22 | let [_y @ ..] = a; |
0531ce1d XL |
23 | } |
24 | ||
25 | fn main() { | |
26 | move_out_by_subslice(); | |
27 | move_out_from_end(); | |
28 | } |