about summary refs log tree commit diff
path: root/tests/ui/macros
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/macros
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/macros')
-rw-r--r--tests/ui/macros/macro-path-prelude-fail-4.stderr6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/ui/macros/macro-path-prelude-fail-4.stderr b/tests/ui/macros/macro-path-prelude-fail-4.stderr
index dfd6818b678..fb4e19d8565 100644
--- a/tests/ui/macros/macro-path-prelude-fail-4.stderr
+++ b/tests/ui/macros/macro-path-prelude-fail-4.stderr
@@ -3,6 +3,12 @@ error: expected derive macro, found built-in attribute `inline`
    |
 LL | #[derive(inline)]
    |          ^^^^^^ not a derive macro
+   |
+help: remove the surrounding "derive()":
+  --> $DIR/macro-path-prelude-fail-4.rs:1:3
+   |
+LL | #[derive(inline)]
+   |   ^^^^^^^      ^
 
 error: aborting due to previous error