Skip to content

Commit

Permalink
Remove feature(box_syntax) from unused allocation list test
Browse files Browse the repository at this point in the history
  • Loading branch information
WaffleLapkin committed Mar 3, 2023
1 parent 7f5338a commit a90abd6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/ui/lint/unused/unused-allocation.rs
Original file line number Diff line number Diff line change
@@ -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
}
4 changes: 2 additions & 2 deletions tests/ui/lint/unused/unused-allocation.stderr
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit a90abd6

Please sign in to comment.