about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMaybe Waffle <waffle.lapkin@gmail.com>2023-03-03 19:02:35 +0000
committerMaybe Waffle <waffle.lapkin@gmail.com>2023-03-03 19:02:35 +0000
commita90abd64fbb0764007d93d60823161f05f564259 (patch)
treeafd45af655c7925097e4ee924ee80f791bddcc6d
parent7f5338a1223555e59b7fa096087f0af9455a1af4 (diff)
downloadrust-a90abd64fbb0764007d93d60823161f05f564259.tar.gz
rust-a90abd64fbb0764007d93d60823161f05f564259.zip
Remove `feature(box_syntax)` from unused allocation list test
-rw-r--r--tests/ui/lint/unused/unused-allocation.rs4
-rw-r--r--tests/ui/lint/unused/unused-allocation.stderr4
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/ui/lint/unused/unused-allocation.rs b/tests/ui/lint/unused/unused-allocation.rs
index df51dd194d5..c1a6f5ceaf1 100644
--- a/tests/ui/lint/unused/unused-allocation.rs
+++ b/tests/ui/lint/unused/unused-allocation.rs
@@ -1,7 +1,7 @@
-#![feature(box_syntax)]
+#![feature(rustc_attrs, stmt_expr_attributes)]
 #![deny(unused_allocation)]
 
 fn main() {
-    _ = (box [1]).len(); //~ error: unnecessary allocation, use `&` instead
+    _ = (#[rustc_box] Box::new([1])).len(); //~ error: unnecessary allocation, use `&` instead
     _ = Box::new([1]).len(); //~ error: unnecessary allocation, use `&` instead
 }
diff --git a/tests/ui/lint/unused/unused-allocation.stderr b/tests/ui/lint/unused/unused-allocation.stderr
index 91bd1da35a3..c9ccfbd30e5 100644
--- a/tests/ui/lint/unused/unused-allocation.stderr
+++ b/tests/ui/lint/unused/unused-allocation.stderr
@@ -1,8 +1,8 @@
 error: unnecessary allocation, use `&` instead
   --> $DIR/unused-allocation.rs:5:9
    |
-LL |     _ = (box [1]).len();
-   |         ^^^^^^^^^
+LL |     _ = (#[rustc_box] Box::new([1])).len();
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
 note: the lint level is defined here
   --> $DIR/unused-allocation.rs:2:9