diff options
| author | León Orell Valerian Liehr <me@fmease.dev> | 2024-06-03 07:17:19 +0200 |
|---|---|---|
| committer | León Orell Valerian Liehr <me@fmease.dev> | 2024-06-03 07:25:32 +0200 |
| commit | b2949ff9118715ce26af3c0b023921ca855ca772 (patch) | |
| tree | 51993910ecab4d65a9f052785d8c1942afbcb872 /compiler/rustc_lint/src/context/diagnostics.rs | |
| parent | 9f2d0b3490729ed65da73f64b28d8d1f197af113 (diff) | |
| download | rust-b2949ff9118715ce26af3c0b023921ca855ca772.tar.gz rust-b2949ff9118715ce26af3c0b023921ca855ca772.zip | |
Spruce up the diagnostics of some early lints
Diffstat (limited to 'compiler/rustc_lint/src/context/diagnostics.rs')
| -rw-r--r-- | compiler/rustc_lint/src/context/diagnostics.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_lint/src/context/diagnostics.rs b/compiler/rustc_lint/src/context/diagnostics.rs index 26f34486a3d..e1676d18b6e 100644 --- a/compiler/rustc_lint/src/context/diagnostics.rs +++ b/compiler/rustc_lint/src/context/diagnostics.rs @@ -340,8 +340,9 @@ pub(super) fn decorate_lint(sess: &Session, diagnostic: BuiltinLintDiag, diag: & lints::MacroUseDeprecated.decorate_lint(diag); } BuiltinLintDiag::UnusedMacroUse => lints::UnusedMacroUse.decorate_lint(diag), - BuiltinLintDiag::PrivateExternCrateReexport(ident) => { - lints::PrivateExternCrateReexport { ident }.decorate_lint(diag); + BuiltinLintDiag::PrivateExternCrateReexport { source: ident, extern_crate_span } => { + lints::PrivateExternCrateReexport { ident, sugg: extern_crate_span.shrink_to_lo() } + .decorate_lint(diag); } BuiltinLintDiag::UnusedLabel => lints::UnusedLabel.decorate_lint(diag), BuiltinLintDiag::MacroIsPrivate(ident) => { |
