about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src/macros.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-07-24 09:50:20 +0000
committerbors <bors@rust-lang.org>2025-07-24 09:50:20 +0000
commitfc5af1813307d25a84d633f21e2e53c9376eb547 (patch)
treee1223cf4321fadd4be4bd386ccad8e88198564cf /compiler/rustc_resolve/src/macros.rs
parent3c30dbbe31bfbf6029f4534170165ba573ff0fd1 (diff)
parent4b557912af68afa5344e29922457c5df2e784078 (diff)
downloadrust-fc5af1813307d25a84d633f21e2e53c9376eb547.tar.gz
rust-fc5af1813307d25a84d633f21e2e53c9376eb547.zip
Auto merge of #144272 - petrochenkov:disambunder2, r=oli-obk
resolve: Make disambiguators for underscore bindings module-local (take 2)

The difference with https://github.com/rust-lang/rust/pull/144013 can be seen in the second commit.

Now we just keep a separate disambiguator counter in every `Module`, instead of a global counter in `Resolver`.
This will be ok for parallel import resolution because we'll need to lock the module anyway when updating `resolutions` and other fields in it.
And for external modules the disabmiguator could be just passed as an argument to `define_extern`, without using any cells or locks, once https://github.com/rust-lang/rust/pull/143884 lands.

Unblocks https://github.com/rust-lang/rust/pull/143884.
Diffstat (limited to 'compiler/rustc_resolve/src/macros.rs')
-rw-r--r--compiler/rustc_resolve/src/macros.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_resolve/src/macros.rs b/compiler/rustc_resolve/src/macros.rs
index 333fc808d1b..f0225daa09d 100644
--- a/compiler/rustc_resolve/src/macros.rs
+++ b/compiler/rustc_resolve/src/macros.rs
@@ -535,7 +535,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 {