diff options
| author | Eric Huss <eric@huss.org> | 2024-11-20 16:36:18 -0800 |
|---|---|---|
| committer | Eric Huss <eric@huss.org> | 2024-11-20 17:12:19 -0800 |
| commit | a1838660c3820c74b987a1630c405ed5c575c70a (patch) | |
| tree | c55fa47ea8ec06a178f5f6055b27b2b517001fd8 /tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm.rs | |
| parent | 78993684f2ba22082197d63627f3e91069911839 (diff) | |
| download | rust-a1838660c3820c74b987a1630c405ed5c575c70a.tar.gz rust-a1838660c3820c74b987a1630c405ed5c575c70a.zip | |
Add tests for the edition of macro_rules from a proc-macro
Diffstat (limited to 'tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm.rs')
| -rw-r--r-- | tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm.rs | 18 |
1 files changed, 18 insertions, 0 deletions
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 new file mode 100644 index 00000000000..fbe3ffaf0b8 --- /dev/null +++ b/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm.rs @@ -0,0 +1,18 @@ +// Test for unsafe attributes generated by a proc-macro. +// See https://github.com/rust-lang/rust/issues/132906 + +//@ revisions: edition2021 edition2024 +//@[edition2021] check-pass +//@[edition2021] edition:2021 +//@[edition2024] edition:2024 +//@[edition2024] compile-flags: -Zunstable-options +//@ aux-crate: unsafe_attributes_pm=unsafe-attributes-pm.rs + +unsafe_attributes_pm::missing_unsafe!(); + +unsafe_attributes_pm::macro_rules_missing_unsafe!(); +//[edition2024]~^ ERROR unsafe attribute used without unsafe + +make_fn!(); + +fn main() {} |
