diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2021-04-01 19:05:14 +0200 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2022-03-31 13:24:33 +0200 |
| commit | b29fa94d22e7a20b3dd1eb8eae5e192ccbf89b58 (patch) | |
| tree | e86eb61fb6676b3b4b8bd349d510669ea4a644fd /compiler/rustc_resolve/src | |
| parent | ffaf6f0d0ccfbc76da00baded073d10f05ffcbd1 (diff) | |
| download | rust-b29fa94d22e7a20b3dd1eb8eae5e192ccbf89b58.tar.gz rust-b29fa94d22e7a20b3dd1eb8eae5e192ccbf89b58.zip | |
Remove mutability in ResolverAstLowering.
Diffstat (limited to 'compiler/rustc_resolve/src')
| -rw-r--r-- | compiler/rustc_resolve/src/lib.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/compiler/rustc_resolve/src/lib.rs b/compiler/rustc_resolve/src/lib.rs index 48675fa8827..0393a391c8a 100644 --- a/compiler/rustc_resolve/src/lib.rs +++ b/compiler/rustc_resolve/src/lib.rs @@ -1160,9 +1160,9 @@ impl<'a, 'b> DefIdTree for &'a Resolver<'b> { /// This interface is used through the AST→HIR step, to embed full paths into the HIR. After that /// the resolver is no longer needed as all the relevant information is inline. impl ResolverAstLowering for Resolver<'_> { - fn def_key(&mut self, id: DefId) -> DefKey { + fn def_key(&self, id: DefId) -> DefKey { if let Some(id) = id.as_local() { - self.definitions().def_key(id) + self.definitions.def_key(id) } else { self.cstore().def_key(id) } @@ -1189,22 +1189,22 @@ impl ResolverAstLowering for Resolver<'_> { self.partial_res_map.get(&id).cloned() } - fn get_import_res(&mut self, id: NodeId) -> PerNS<Option<Res>> { + fn get_import_res(&self, id: NodeId) -> PerNS<Option<Res>> { self.import_res_map.get(&id).cloned().unwrap_or_default() } - fn get_label_res(&mut self, id: NodeId) -> Option<NodeId> { + fn get_label_res(&self, id: NodeId) -> Option<NodeId> { self.label_res_map.get(&id).cloned() } - fn definitions(&mut self) -> &mut Definitions { - &mut self.definitions - } - fn create_stable_hashing_context(&self) -> StableHashingContext<'_> { StableHashingContext::new(self.session, &self.definitions, self.crate_loader.cstore()) } + fn definitions(&self) -> &Definitions { + &self.definitions + } + fn lint_buffer(&mut self) -> &mut LintBuffer { &mut self.lint_buffer } |
