mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-22 11:53:44 +00:00
![]() Add suggestion to remove `derive()` if invoked macro is non-derive Adds to the existing `expected derive macro, found {}` error message: ``` help: remove the surrounding "derive()": --> $DIR/macro-path-prelude-fail-4.rs:1:3 | LL | #[derive(inline)] | ^^^^^^^ ^ ``` This suggestion will either fix the issue, in the case that the macro was valid, or provide a better error message if not Not ready for merge yet, as the highlighted span is only valid for trivial formatting. Is there a nice way to get the parent span of the macro path within `smart_resolve_macro_path`? Closes #109589 |
||
---|---|---|
.. | ||
assembly | ||
auxiliary | ||
codegen | ||
codegen-units | ||
debuginfo | ||
incremental | ||
mir-opt | ||
pretty | ||
run-make | ||
run-make-fulldeps | ||
run-pass-valgrind | ||
rustdoc | ||
rustdoc-gui | ||
rustdoc-js | ||
rustdoc-js-std | ||
rustdoc-json | ||
rustdoc-ui | ||
ui | ||
ui-fulldeps | ||
COMPILER_TESTS.md |