diff options
| author | Josh Triplett <josh@joshtriplett.org> | 2025-08-14 01:56:14 -0700 |
|---|---|---|
| committer | Josh Triplett <josh@joshtriplett.org> | 2025-08-20 15:04:00 -0700 |
| commit | f0c8f7062b3f765c34954fe4036c48d54d25ac55 (patch) | |
| tree | f54a814d58a7965f27b1053c181e7fc1436c413d /compiler/rustc_lint/src/early/diagnostics.rs | |
| parent | 6cb9dd563cf6cde5959c3c439b90e1a832c7cef9 (diff) | |
| download | rust-f0c8f7062b3f765c34954fe4036c48d54d25ac55.tar.gz rust-f0c8f7062b3f765c34954fe4036c48d54d25ac55.zip | |
rustc_lint_defs: Eliminate the dependency on `rustc_hir` for `Namespace`
`rustc_lint_defs` uses `rustc_hir` solely for the `Namespace` type, which it only needs the static description from. Use the static description directly, to eliminate the dependency on `rustc_hir`. This reduces a long dependency chain: - Many things depend on `rustc_errors` - `rustc_errors` depends on `rustc_lint_defs` - `rustc_lint_defs` depended on `rustc_hir` prior to this commit - `rustc_hir` depends on `rustc_target`
Diffstat (limited to 'compiler/rustc_lint/src/early/diagnostics.rs')
| -rw-r--r-- | compiler/rustc_lint/src/early/diagnostics.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/compiler/rustc_lint/src/early/diagnostics.rs b/compiler/rustc_lint/src/early/diagnostics.rs index 678d3d1f8ed..0e283ed923a 100644 --- a/compiler/rustc_lint/src/early/diagnostics.rs +++ b/compiler/rustc_lint/src/early/diagnostics.rs @@ -64,10 +64,12 @@ pub fn decorate_builtin_lint( } .decorate_lint(diag); } - BuiltinLintDiag::ProcMacroDeriveResolutionFallback { span: macro_span, ns, ident } => { - lints::ProcMacroDeriveResolutionFallback { span: macro_span, ns, ident } - .decorate_lint(diag) - } + BuiltinLintDiag::ProcMacroDeriveResolutionFallback { + span: macro_span, + ns_descr, + ident, + } => lints::ProcMacroDeriveResolutionFallback { span: macro_span, ns_descr, ident } + .decorate_lint(diag), BuiltinLintDiag::MacroExpandedMacroExportsAccessedByAbsolutePaths(span_def) => { lints::MacroExpandedMacroExportsAccessedByAbsolutePaths { definition: span_def } .decorate_lint(diag) |
