rust/compiler/rustc_resolve/src
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
..
diagnostics Implement the unused_macro_rules lint 2022-05-05 19:13:00 +02:00
late suggest adding const param 2023-04-07 09:11:53 +02:00
build_reduced_graph.rs resolve: Preserve reexport chains in ModChildren 2023-04-08 13:29:15 +03:00
check_unused.rs Migrate sess.opts.tests uses to sess.is_test_crate() 2023-04-09 21:37:31 +02:00
def_collector.rs Remove the NodeId of ast::ExprKind::Async 2023-03-19 19:01:31 +01:00
diagnostics.rs Make span a bit better 2023-04-06 16:52:17 +00:00
effective_visibilities.rs resolve: Restore some effective visibility optimizations 2023-03-31 17:07:59 +04:00
errors.rs Auto merge of #109638 - NotStirred:suggest/non-derive, r=davidtwco 2023-04-10 21:50:46 +00:00
ident.rs Rollup merge of #109909 - clubby789:import-tool-mod, r=petrochenkov 2023-04-06 07:18:29 +09:00
imports.rs resolve: Preserve reexport chains in ModChildren 2023-04-08 13:29:15 +03:00
late.rs Remove turbofish 2023-04-09 23:32:04 +02:00
lib.rs Add (..) syntax for RTN 2023-03-28 01:14:28 +00:00
macros.rs Change type and field name to be clearer 2023-04-07 08:44:19 +01:00
rustdoc.rs Update doc(primitive) in rustc_resolve 2023-03-31 00:04:24 +02:00