diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2025-07-25 22:14:09 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2025-07-26 00:19:12 +0300 |
| commit | 2c657901605ed5e6e6d3ab52e824f35e25cf4516 (patch) | |
| tree | 21d3bbc28ff1f9890816e8ecd7dfa865ef6854cb /compiler/rustc_resolve/src/effective_visibilities.rs | |
| parent | a955f1cd09a027363729ceed919952d09f76f28e (diff) | |
| download | rust-2c657901605ed5e6e6d3ab52e824f35e25cf4516.tar.gz rust-2c657901605ed5e6e6d3ab52e824f35e25cf4516.zip | |
resolve: Minimize borrow scopes for `resolutions`
Diffstat (limited to 'compiler/rustc_resolve/src/effective_visibilities.rs')
| -rw-r--r-- | compiler/rustc_resolve/src/effective_visibilities.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_resolve/src/effective_visibilities.rs b/compiler/rustc_resolve/src/effective_visibilities.rs index 34d1e9552fd..fe6e5b8e6eb 100644 --- a/compiler/rustc_resolve/src/effective_visibilities.rs +++ b/compiler/rustc_resolve/src/effective_visibilities.rs @@ -114,9 +114,7 @@ impl<'a, 'ra, 'tcx> EffectiveVisibilitiesVisitor<'a, 'ra, 'tcx> { /// including their whole reexport chains. fn set_bindings_effective_visibilities(&mut self, module_id: LocalDefId) { let module = self.r.expect_module(module_id.to_def_id()); - let resolutions = self.r.resolutions(module); - - for (_, name_resolution) in resolutions.borrow().iter() { + for (_, name_resolution) in self.r.resolutions(module).borrow().iter() { let Some(mut binding) = name_resolution.borrow().binding() else { continue; }; |
