about summary refs log tree commit diff
path: root/tests/ui/rust-2024
diff options
context:
space:
mode:
authorEric Huss <eric@huss.org>2024-11-20 17:12:56 -0800
committerEric Huss <eric@huss.org>2024-11-20 17:28:47 -0800
commit993e084eb1eb8bc29eae0620bbbb2c3009cec6dd (patch)
treea7707931e8bdf0ce4bb35263aae12427327fe95b /tests/ui/rust-2024
parenta1838660c3820c74b987a1630c405ed5c575c70a (diff)
downloadrust-993e084eb1eb8bc29eae0620bbbb2c3009cec6dd.tar.gz
rust-993e084eb1eb8bc29eae0620bbbb2c3009cec6dd.zip
Use edition of `macro_rules` when compiling the macro
Diffstat (limited to 'tests/ui/rust-2024')
-rw-r--r--tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm.edition2024.stderr17
-rw-r--r--tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm.rs3
2 files changed, 1 insertions, 19 deletions
diff --git a/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm.edition2024.stderr b/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm.edition2024.stderr
deleted file mode 100644
index 4bdfe6153e7..00000000000
--- a/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm.edition2024.stderr
+++ /dev/null
@@ -1,17 +0,0 @@
-error: unsafe attribute used without unsafe
-  --> $DIR/unsafe-attributes-from-pm.rs:13:1
-   |
-LL | unsafe_attributes_pm::macro_rules_missing_unsafe!();
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ usage of unsafe attribute
-...
-LL | make_fn!();
-   | ---------- in this macro invocation
-   |
-   = note: this error originates in the macro `make_fn` (in Nightly builds, run with -Z macro-backtrace for more info)
-help: wrap the attribute in `unsafe(...)`
-   |
-LL | ununsafe(safe_attributes_pm::macro_rules_missing_unsafe!());
-   |   +++++++                                                +
-
-error: aborting due to 1 previous error
-
diff --git a/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm.rs b/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm.rs
index fbe3ffaf0b8..782a3942236 100644
--- a/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm.rs
+++ b/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm.rs
@@ -2,7 +2,7 @@
 // See https://github.com/rust-lang/rust/issues/132906
 
 //@ revisions: edition2021 edition2024
-//@[edition2021] check-pass
+//@ check-pass
 //@[edition2021] edition:2021
 //@[edition2024] edition:2024
 //@[edition2024] compile-flags: -Zunstable-options
@@ -11,7 +11,6 @@
 unsafe_attributes_pm::missing_unsafe!();
 
 unsafe_attributes_pm::macro_rules_missing_unsafe!();
-//[edition2024]~^ ERROR unsafe attribute used without unsafe
 
 make_fn!();