diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-07-13 15:15:59 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-13 15:15:59 +0200 |
| commit | dcdb35a7308a1b9a8bc72658aa402ee2472b1910 (patch) | |
| tree | f2d14fa995443f491105dea21f1f157d1cbc7705 /compiler/rustc_resolve/src/ident.rs | |
| parent | acbf5e4f50f63adaa34f1308fc175c76709ff60a (diff) | |
| parent | 9ed5378cfd5b6a34000fe5218f94bd14976c3de7 (diff) | |
| download | rust-dcdb35a7308a1b9a8bc72658aa402ee2472b1910.tar.gz rust-dcdb35a7308a1b9a8bc72658aa402ee2472b1910.zip | |
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````
Diffstat (limited to 'compiler/rustc_resolve/src/ident.rs')
| -rw-r--r-- | compiler/rustc_resolve/src/ident.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_resolve/src/ident.rs b/compiler/rustc_resolve/src/ident.rs index 6772632b84e..99297de40d5 100644 --- a/compiler/rustc_resolve/src/ident.rs +++ b/compiler/rustc_resolve/src/ident.rs @@ -875,7 +875,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { // binding if it exists. What we really want here is having two separate scopes in // a module - one for non-globs and one for globs, but until that's done use this // hack to avoid inconsistent resolution ICEs during import validation. - let binding = [resolution.binding, resolution.shadowed_glob] + let binding = [resolution.non_glob_binding, resolution.glob_binding] .into_iter() .find_map(|binding| if binding == ignore_binding { None } else { binding }); @@ -883,7 +883,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { return self.finalize_module_binding( ident, binding, - resolution.shadowed_glob, + if resolution.non_glob_binding.is_some() { resolution.glob_binding } else { None }, parent_scope, finalize, shadowing, |
