rust/compiler/rustc_resolve
bors 194a0bb5d6 Auto merge of #109638 - NotStirred:suggest/non-derive, r=davidtwco
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
2023-04-10 21:50:46 +00:00
..
src Auto merge of #109638 - NotStirred:suggest/non-derive, r=davidtwco 2023-04-10 21:50:46 +00:00
Cargo.toml Upgrade thin-vec from 0.2.9 to 0.2.12. 2023-02-21 11:51:55 +11:00
messages.ftl Auto merge of #109638 - NotStirred:suggest/non-derive, r=davidtwco 2023-04-10 21:50:46 +00:00