about summary refs log tree commit diff
path: root/tests/ui/tool-attributes/tool-attributes-misplaced-2.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/tool-attributes/tool-attributes-misplaced-2.rs')
-rw-r--r--tests/ui/tool-attributes/tool-attributes-misplaced-2.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/ui/tool-attributes/tool-attributes-misplaced-2.rs b/tests/ui/tool-attributes/tool-attributes-misplaced-2.rs
new file mode 100644
index 00000000000..b5666e4ea70
--- /dev/null
+++ b/tests/ui/tool-attributes/tool-attributes-misplaced-2.rs
@@ -0,0 +1,6 @@
+#[derive(rustfmt::skip)] //~ ERROR expected derive macro, found tool attribute `rustfmt::skip`
+struct S;
+
+fn main() {
+    rustfmt::skip!(); //~ ERROR expected macro, found tool attribute `rustfmt::skip`
+}