about summary refs log tree commit diff
path: root/compiler/rustc_lint/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-07-29 06:04:41 +0000
committerbors <bors@rust-lang.org>2023-07-29 06:04:41 +0000
commit2dc661037d059bff1487b76ca949ced7b3cd46c9 (patch)
treef5666979d20c236dfa502383e8a2cff8fde8bc2e /compiler/rustc_lint/src
parent5ed61a4378700aeb5af88385d9ae054c8adf2322 (diff)
parent771c832338d57390018d41458a3223bc18eacedc (diff)
downloadrust-2dc661037d059bff1487b76ca949ced7b3cd46c9.tar.gz
rust-2dc661037d059bff1487b76ca949ced7b3cd46c9.zip
Auto merge of #113099 - bvanjoi:fix-112713-2, r=petrochenkov
fix(resolve): update the ambiguity glob binding as warning recursively

Fixes #47525
Fixes #56593, but `issue-56593-2.rs` is not fixed to ensure backward compatibility.
Fixes #98467
Fixes #105235
Fixes #112713

This PR had added a field called `warn_ambiguous` in `NameBinding` which is only for back compatibly reason and used for lint.

More details: https://github.com/rust-lang/rust/pull/112743

r? `@petrochenkov`
Diffstat (limited to 'compiler/rustc_lint/src')
-rw-r--r--compiler/rustc_lint/src/context.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_lint/src/context.rs b/compiler/rustc_lint/src/context.rs
index 65c56bff841..f7e56b30553 100644
--- a/compiler/rustc_lint/src/context.rs
+++ b/compiler/rustc_lint/src/context.rs
@@ -946,6 +946,9 @@ pub trait LintContext: Sized {
                         Applicability::MachineApplicable,
                     );
                 }
+                BuiltinLintDiagnostics::AmbiguousGlobImports { diag } => {
+                    rustc_errors::report_ambiguity_error(db, diag);
+                }
                 BuiltinLintDiagnostics::AmbiguousGlobReexports { name, namespace, first_reexport_span, duplicate_reexport_span } => {
                     db.span_label(first_reexport_span, format!("the name `{name}` in the {namespace} namespace is first re-exported here"));
                     db.span_label(duplicate_reexport_span, format!("but the name `{name}` in the {namespace} namespace is also re-exported here"));