diff options
| 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 |
| commit | 1f67949f0e9cd6c80a3e325164ef17663127f07b (patch) | |
| tree | 6582972e52483fd8b41e52430c3e421a486ce981 /compiler/rustc_lint/src | |
| parent | ab9bb3ea368b2412531a3e8c07ba73d1dd690134 (diff) | |
| download | rust-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.rs | 4 |
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) |
