about summary refs log tree commit diff
path: root/tests/ui/attributes/rustc-box.rs
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2025-01-02 21:22:42 +0100
committerRalf Jung <post@ralfj.de>2025-01-03 12:01:31 +0100
commitac9cb908ac4301dfc25e7a2edee574320022ae2c (patch)
tree5b56b884318fc58bf28c82a38d0a2e7efd9d9207 /tests/ui/attributes/rustc-box.rs
parentbf6f8a4d328f7f3b0f6ea8205ad28591cc11aafd (diff)
downloadrust-ac9cb908ac4301dfc25e7a2edee574320022ae2c.tar.gz
rust-ac9cb908ac4301dfc25e7a2edee574320022ae2c.zip
turn rustc_box into an intrinsic
Diffstat (limited to 'tests/ui/attributes/rustc-box.rs')
-rw-r--r--tests/ui/attributes/rustc-box.rs18
1 files changed, 0 insertions, 18 deletions
diff --git a/tests/ui/attributes/rustc-box.rs b/tests/ui/attributes/rustc-box.rs
deleted file mode 100644
index b3726fb3867..00000000000
--- a/tests/ui/attributes/rustc-box.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-#![feature(rustc_attrs, stmt_expr_attributes)]
-
-fn foo(_: u32, _: u32) {}
-fn bar(_: u32) {}
-
-fn main() {
-    #[rustc_box]
-    Box::new(1); // OK
-    #[rustc_box]
-    Box::pin(1); //~ ERROR `#[rustc_box]` attribute used incorrectly
-    #[rustc_box]
-    foo(1, 1); //~ ERROR `#[rustc_box]` attribute used incorrectly
-    #[rustc_box]
-    bar(1); //~ ERROR `#[rustc_box]` attribute used incorrectly
-    #[rustc_box] //~ ERROR `#[rustc_box]` attribute used incorrectly
-    #[rustfmt::skip]
-    Box::new(1);
-}