about summary refs log tree commit diff
path: root/tests/ui/tool-attributes
diff options
context:
space:
mode:
authorTom Martin <tom.martin1239@gmail.com>2023-03-26 15:59:45 +0100
committerTom Martin <tom.martin1239@gmail.com>2023-03-26 16:01:25 +0100
commit42f2be8a8c655695ecf2b56eebf023faf7d62463 (patch)
tree494c2329fd7deff61ad2587f81456e604e0c66d9 /tests/ui/tool-attributes
parent89c2e3d3d75486e52473de3ae38f0ca6efeffef2 (diff)
downloadrust-42f2be8a8c655695ecf2b56eebf023faf7d62463.tar.gz
rust-42f2be8a8c655695ecf2b56eebf023faf7d62463.zip
Add suggestion to remove derive() if invoked macro is non-derive
Diffstat (limited to 'tests/ui/tool-attributes')
-rw-r--r--tests/ui/tool-attributes/tool-attributes-misplaced-2.stderr6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/ui/tool-attributes/tool-attributes-misplaced-2.stderr b/tests/ui/tool-attributes/tool-attributes-misplaced-2.stderr
index 6d0f826e621..6befa99f583 100644
--- a/tests/ui/tool-attributes/tool-attributes-misplaced-2.stderr
+++ b/tests/ui/tool-attributes/tool-attributes-misplaced-2.stderr
@@ -3,6 +3,12 @@ error: expected derive macro, found tool attribute `rustfmt::skip`
    |
 LL | #[derive(rustfmt::skip)]
    |          ^^^^^^^^^^^^^ not a derive macro
+   |
+help: remove the surrounding "derive()":
+  --> $DIR/tool-attributes-misplaced-2.rs:1:3
+   |
+LL | #[derive(rustfmt::skip)]
+   |   ^^^^^^^             ^
 
 error: expected macro, found tool attribute `rustfmt::skip`
   --> $DIR/tool-attributes-misplaced-2.rs:5:5