diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2025-07-07 00:39:07 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2025-07-17 02:09:01 +0300 |
| commit | 6849f816b1c908b446698a08b5cd27d258bad073 (patch) | |
| tree | ed85f7e10d684fbbe762b0d6a8ce7158822f26a0 /compiler/rustc_resolve/src/lib.rs | |
| parent | 8b8889df2550fac573cbaddb1db1419080118d63 (diff) | |
| download | rust-6849f816b1c908b446698a08b5cd27d258bad073.tar.gz rust-6849f816b1c908b446698a08b5cd27d258bad073.zip | |
resolve: Change `&mut Resolver` to `&Resolver` when possible
Diffstat (limited to 'compiler/rustc_resolve/src/lib.rs')
| -rw-r--r-- | compiler/rustc_resolve/src/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_resolve/src/lib.rs b/compiler/rustc_resolve/src/lib.rs index 98786c1e6f9..3202d31fdbc 100644 --- a/compiler/rustc_resolve/src/lib.rs +++ b/compiler/rustc_resolve/src/lib.rs @@ -1624,7 +1624,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { } fn new_extern_module( - &mut self, + &self, parent: Option<Module<'ra>>, kind: ModuleKind, expn_id: ExpnId, @@ -2021,7 +2021,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { } } - fn resolve_crate_root(&mut self, ident: Ident) -> Module<'ra> { + fn resolve_crate_root(&self, ident: Ident) -> Module<'ra> { debug!("resolve_crate_root({:?})", ident); let mut ctxt = ident.span.ctxt(); let mark = if ident.name == kw::DollarCrate { @@ -2094,7 +2094,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { module } - fn resolve_self(&mut self, ctxt: &mut SyntaxContext, module: Module<'ra>) -> Module<'ra> { + fn resolve_self(&self, ctxt: &mut SyntaxContext, module: Module<'ra>) -> Module<'ra> { let mut module = self.expect_module(module.nearest_parent_mod()); while module.span.ctxt().normalize_to_macros_2_0() != *ctxt { let parent = module.parent.unwrap_or_else(|| self.expn_def_scope(ctxt.remove_mark())); |
