about summary refs log tree commit diff
path: root/compiler/rustc_lint/src
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com>2023-03-20 03:11:28 +0800
committer许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com>2023-03-20 03:22:31 +0800
commit1f67949f0e9cd6c80a3e325164ef17663127f07b (patch)
tree6582972e52483fd8b41e52430c3e421a486ce981 /compiler/rustc_lint/src
parentab9bb3ea368b2412531a3e8c07ba73d1dd690134 (diff)
downloadrust-1f67949f0e9cd6c80a3e325164ef17663127f07b.tar.gz
rust-1f67949f0e9cd6c80a3e325164ef17663127f07b.zip
Lint ambiguous glob re-exports
Diffstat (limited to 'compiler/rustc_lint/src')
-rw-r--r--compiler/rustc_lint/src/context.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_lint/src/context.rs b/compiler/rustc_lint/src/context.rs
index f5a711315ea..626c09fea07 100644
--- a/compiler/rustc_lint/src/context.rs
+++ b/compiler/rustc_lint/src/context.rs
@@ -910,6 +910,10 @@ pub trait LintContext: Sized {
                         Applicability::MachineApplicable,
                     );
                 }
+                BuiltinLintDiagnostics::AmbiguousGlobReexports { name, namespace, first_reexport_span, duplicate_reexport_span } => {
+                    db.span_label(first_reexport_span, format!("the name `{}` in the {} namespace is first re-exported here", name, namespace));
+                    db.span_label(duplicate_reexport_span, format!("but the name `{}` in the {} namespace is also re-exported here", name, namespace));
+                }
             }
             // Rewrap `db`, and pass control to the user.
             decorate(db)