resolve: Make disambiguators for underscore bindings module-local

This commit is contained in:
Vadim Petrochenkov
2025-07-15 23:42:35 +03:00
parent 8c12d76304
commit 998df3a3e8
4 changed files with 58 additions and 45 deletions

View File

@@ -530,7 +530,7 @@ impl<'ra, 'tcx> ResolverExpand for Resolver<'ra, 'tcx> {
target_trait.for_each_child(self, |this, ident, ns, _binding| {
// FIXME: Adjust hygiene for idents from globs, like for glob imports.
if let Some(overriding_keys) = this.impl_binding_keys.get(&impl_def_id)
&& overriding_keys.contains(&BindingKey::new(ident.normalize_to_macros_2_0(), ns))
&& overriding_keys.contains(&BindingKey::new(ident, ns))
{
// The name is overridden, do not produce it from the glob delegation.
} else {