We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c8618d2 commit 87b2796Copy full SHA for 87b2796
tests/ui/attributes/proc-macro-unsafe.rs
@@ -0,0 +1,9 @@
1
+//@ proc-macro: external-macro-use.rs
2
+
3
+extern crate external_macro_use;
4
5
+#[unsafe(external_macro_use::a)]
6
+//~^ ERROR unnecessary `unsafe` on safe attribute
7
+fn f() {}
8
9
+fn main() {}
tests/ui/attributes/proc-macro-unsafe.stderr
@@ -0,0 +1,8 @@
+error: unnecessary `unsafe` on safe attribute
+ --> $DIR/proc-macro-unsafe.rs:5:3
+ |
+LL | #[unsafe(external_macro_use::a)]
+ | ^^^^^^
+error: aborting due to 1 previous error
0 commit comments