about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src
diff options
context:
space:
mode:
authorJacob Pratt <jacob@jhpratt.dev>2025-08-21 01:12:17 -0400
committerGitHub <noreply@github.com>2025-08-21 01:12:17 -0400
commit62582eb78ed097cfaee941faef36c2de4a41ca41 (patch)
treeb5deef3e887a5585e4679467615be37a406d9731 /compiler/rustc_resolve/src
parent537d5f40a6d45c3531df85555952e277977fbaaf (diff)
parent2ea7e7da0074d4b7fa69008f5f7c5c995f39eec3 (diff)
downloadrust-62582eb78ed097cfaee941faef36c2de4a41ca41.tar.gz
rust-62582eb78ed097cfaee941faef36c2de4a41ca41.zip
Rollup merge of #145390 - joshtriplett:rustc-diag-value-earlier, r=lcnr
Shorten some dependency chains in the compiler

(I recommend reviewing this commit by commit.)

One of the long dependency chains in the compiler is:
- Many things depend on `rustc_errors`.
- `rustc_errors` depended on many things prior to this PR, including `rustc_target`, `rustc_type_ir`, `rustc_hir`, and `rustc_lint_defs`.
- `rustc_lint_defs` depended on `rustc_hir` prior to this PR.
- `rustc_hir` depends on `rustc_target`.
- `rustc_target` is large and takes a while.

This PR breaks that chain, through a few steps:
- The `IntoDiagArgs` trait, from `rustc_errors`, moves earlier in the dependency chain. This allows `rustc_errors` to stop depending on a pile of crates just to implement `IntoDiagArgs` for their types.
- Split `rustc_hir_id` out of `rustc_hir`, so crates that just need `HirId` and similar don't depend on all of `rust_hir` (and thus `rustc_target`).
- Make `rustc_lint_defs` stop depending on `rustc_hir`.
Diffstat (limited to 'compiler/rustc_resolve/src')
-rw-r--r--compiler/rustc_resolve/src/ident.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_resolve/src/ident.rs b/compiler/rustc_resolve/src/ident.rs
index c1b3aff4e69..650154d586f 100644
--- a/compiler/rustc_resolve/src/ident.rs
+++ b/compiler/rustc_resolve/src/ident.rs
@@ -528,7 +528,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
                                         orig_ident.span,
                                         BuiltinLintDiag::ProcMacroDeriveResolutionFallback {
                                             span: orig_ident.span,
-                                            ns,
+                                            ns_descr: ns.descr(),
                                             ident,
                                         },
                                     );