rust/compiler/rustc_resolve/src
bors d087f112b7 Auto merge of #134841 - estebank:serde-attr-4, r=wesleywiser
Look at proc-macro attributes when encountering unknown attribute

```
error: cannot find attribute `sede` in this scope
  --> $DIR/missing-derive-2.rs:22:7
   |
LL |     #[sede(untagged)]
   |       ^^^^
   |
help: the derive macros `Deserialize` and `Serialize` accept the similarly named `serde` attribute
   |
LL |     #[serde(untagged)]
   |         +

error: cannot find attribute `serde` in this scope
  --> $DIR/missing-derive-2.rs:16:7
   |
LL |     #[serde(untagged)]
   |       ^^^^^
   |
note: `serde` is imported here, but it is a crate, not an attribute
  --> $DIR/missing-derive-2.rs:5:1
   |
LL | extern crate serde;
   | ^^^^^^^^^^^^^^^^^^^
help: `serde` is an attribute that can be used by the derive macros `Serialize` and `Deserialize`, you might be missing a `derive` attribute
   |
LL + #[derive(Serialize, Deserialize)]
LL | enum B {
   |
```

Partially address #47608. This PR doesn't find [macros that haven't yet been imported by name](https://github.com/rust-lang/rust/pull/109278/commits/af945cb86e03b44a4b6dc4d54ec1424b00a2349e).
2025-06-13 22:59:24 +00:00
..
late Replace elided_named_lifetimes with mismatched_lifetime_syntaxes 2025-06-04 10:40:04 -04:00
rustdoc source_span_for_markdown_range: fix utf8 violation 2025-05-31 14:51:16 -05:00
build_reduced_graph.rs resolve: Tweak private_macro_use lint to be compatible with upcoming macro prelude changes 2025-06-03 00:09:54 +03:00
check_unused.rs deduplicate more walk_* methods in AST visit 2025-06-06 04:59:26 +00:00
def_collector.rs introduce new lint infra 2025-06-12 09:56:47 +02:00
diagnostics.rs Detect when attribute is provided by missing derive macro 2025-06-12 21:28:49 +00:00
effective_visibilities.rs Reorder ast::ItemKind::{Struct,Enum,Union} fields. 2025-05-28 15:48:45 +10:00
errors.rs resolve: Support imports of associated types and glob imports from traits 2025-05-02 15:59:38 +03:00
ident.rs Detect when attribute is provided by missing derive macro 2025-06-12 21:28:49 +00:00
imports.rs resolve: Tweak private_macro_use lint to be compatible with upcoming macro prelude changes 2025-06-03 00:09:54 +03:00
late.rs Detect when attribute is provided by missing derive macro 2025-06-12 21:28:49 +00:00
lib.rs Auto merge of #134841 - estebank:serde-attr-4, r=wesleywiser 2025-06-13 22:59:24 +00:00
macros.rs Auto merge of #134841 - estebank:serde-attr-4, r=wesleywiser 2025-06-13 22:59:24 +00:00
rustdoc.rs source_span_for_markdown_range: fix utf8 violation 2025-05-31 14:51:16 -05:00