diff options
Diffstat (limited to 'tests/mir-opt/building/uniform_array_move_out.rs')
-rw-r--r-- | tests/mir-opt/building/uniform_array_move_out.rs | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/tests/mir-opt/building/uniform_array_move_out.rs b/tests/mir-opt/building/uniform_array_move_out.rs index e925036ec..4ba107c87 100644 --- a/tests/mir-opt/building/uniform_array_move_out.rs +++ b/tests/mir-opt/building/uniform_array_move_out.rs @@ -1,14 +1,24 @@ -#![feature(box_syntax)] +#![feature(stmt_expr_attributes, rustc_attrs)] // EMIT_MIR uniform_array_move_out.move_out_from_end.built.after.mir fn move_out_from_end() { - let a = [box 1, box 2]; + let a = [ + #[rustc_box] + Box::new(1), + #[rustc_box] + Box::new(2), + ]; let [.., _y] = a; } // EMIT_MIR uniform_array_move_out.move_out_by_subslice.built.after.mir fn move_out_by_subslice() { - let a = [box 1, box 2]; + let a = [ + #[rustc_box] + Box::new(1), + #[rustc_box] + Box::new(2), + ]; let [_y @ ..] = a; } |