summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/building/uniform_array_move_out.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:29 +0000
commit631cd5845e8de329d0e227aaa707d7ea228b8f8f (patch)
treea1b87c8f8cad01cf18f7c5f57a08f102771ed303 /tests/mir-opt/building/uniform_array_move_out.rs
parentAdding debian version 1.69.0+dfsg1-1. (diff)
downloadrustc-631cd5845e8de329d0e227aaa707d7ea228b8f8f.tar.xz
rustc-631cd5845e8de329d0e227aaa707d7ea228b8f8f.zip
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/mir-opt/building/uniform_array_move_out.rs')
-rw-r--r--tests/mir-opt/building/uniform_array_move_out.rs16
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;
}