summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/const_prop/boxes.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/const_prop/boxes.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/const_prop/boxes.rs')
-rw-r--r--tests/mir-opt/const_prop/boxes.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/mir-opt/const_prop/boxes.rs b/tests/mir-opt/const_prop/boxes.rs
index d287830db..66e8c24d4 100644
--- a/tests/mir-opt/const_prop/boxes.rs
+++ b/tests/mir-opt/const_prop/boxes.rs
@@ -4,11 +4,13 @@
// ignore-wasm32
// ignore-wasm64
-#![feature(box_syntax)]
+#![feature(rustc_attrs, stmt_expr_attributes)]
-// Note: this test verifies that we, in fact, do not const prop `box`
+// Note: this test verifies that we, in fact, do not const prop `#[rustc_box]`
// EMIT_MIR boxes.main.ConstProp.diff
fn main() {
- let x = *(box 42) + 0;
+ let x = *(#[rustc_box]
+ Box::new(42))
+ + 0;
}