Rollup merge of #143734 - LorrensP-2158466:refactor-resolve-resolution-bindings, r=petrochenkov

Refactor resolve resolution bindings

This pr does the work asked in https://github.com/rust-lang/rust/pull/142547#issuecomment-3001339385. This part:

> move the `(non)_glob_binding` change

r? ````@petrochenkov````
This commit is contained in:
Matthias Krüger
2025-07-13 15:15:59 +02:00
committed by GitHub
7 changed files with 77 additions and 55 deletions

View File

@@ -641,7 +641,7 @@ impl<'ra> Module<'ra> {
F: FnMut(&mut R, Ident, Namespace, NameBinding<'ra>),
{
for (key, name_resolution) in resolver.as_mut().resolutions(self).borrow().iter() {
if let Some(binding) = name_resolution.borrow().binding {
if let Some(binding) = name_resolution.borrow().best_binding() {
f(resolver, key.ident, key.ns, binding);
}
}