diff options
Diffstat (limited to '')
-rw-r--r-- | tests/mir-opt/box_expr.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/mir-opt/box_expr.rs b/tests/mir-opt/box_expr.rs index a214504f6..ad3670b5d 100644 --- a/tests/mir-opt/box_expr.rs +++ b/tests/mir-opt/box_expr.rs @@ -1,17 +1,20 @@ // ignore-wasm32-bare compiled with panic=abort by default -#![feature(box_syntax)] +#![feature(rustc_attrs, stmt_expr_attributes)] // EMIT_MIR box_expr.main.ElaborateDrops.before.mir fn main() { - let x = box S::new(); + let x = #[rustc_box] + Box::new(S::new()); drop(x); } struct S; impl S { - fn new() -> Self { S } + fn new() -> Self { + S + } } impl Drop for S { |