diff options
| author | León Orell Valerian Liehr <me@fmease.dev> | 2024-03-23 17:30:44 +0100 |
|---|---|---|
| committer | León Orell Valerian Liehr <me@fmease.dev> | 2024-04-08 17:34:06 +0200 |
| commit | 8a24ddf64b43f937d7cc800d9bd94baf5c3e691c (patch) | |
| tree | cb4fa85c252d5d70fc090db6b66d1062dc7c4e97 /compiler/rustc_lint/src/context/diagnostics.rs | |
| parent | 5dbaafdb9305df5332157e74eaaa55c615aa489f (diff) | |
| download | rust-8a24ddf64b43f937d7cc800d9bd94baf5c3e691c.tar.gz rust-8a24ddf64b43f937d7cc800d9bd94baf5c3e691c.zip | |
Be more specific when flagging imports that are redundant due to the extern prelude
Diffstat (limited to 'compiler/rustc_lint/src/context/diagnostics.rs')
| -rw-r--r-- | compiler/rustc_lint/src/context/diagnostics.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_lint/src/context/diagnostics.rs b/compiler/rustc_lint/src/context/diagnostics.rs index e2010ab3830..0fbf6f1e1f4 100644 --- a/compiler/rustc_lint/src/context/diagnostics.rs +++ b/compiler/rustc_lint/src/context/diagnostics.rs @@ -105,7 +105,7 @@ pub(super) fn builtin(sess: &Session, diagnostic: BuiltinLintDiag, diag: &mut Di BuiltinLintDiag::RedundantImport(spans, ident) => { for (span, is_imported) in spans { let introduced = if is_imported { "imported" } else { "defined" }; - let span_msg = if span.is_dummy() { "by prelude" } else { "here" }; + let span_msg = if span.is_dummy() { "by the extern prelude" } else { "here" }; diag.span_label( span, format!("the item `{ident}` is already {introduced} {span_msg}"), |
