diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2021-07-13 18:45:20 +0200 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2022-07-06 23:04:55 +0200 |
| commit | 250c71b85d0eed22982ef2b2db92fd5e63772c42 (patch) | |
| tree | 41f7151fba33e5fd0260b811358d4fde003d2270 /compiler/rustc_query_system | |
| parent | 43bb31b9540a439dcca65f47b8644eafe4a42e2d (diff) | |
| download | rust-250c71b85d0eed22982ef2b2db92fd5e63772c42.tar.gz rust-250c71b85d0eed22982ef2b2db92fd5e63772c42.zip | |
Make AST lowering a query.
Diffstat (limited to 'compiler/rustc_query_system')
| -rw-r--r-- | compiler/rustc_query_system/src/ich/hcx.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_query_system/src/ich/hcx.rs b/compiler/rustc_query_system/src/ich/hcx.rs index 89b9a80ee4d..843f6f9d703 100644 --- a/compiler/rustc_query_system/src/ich/hcx.rs +++ b/compiler/rustc_query_system/src/ich/hcx.rs @@ -119,13 +119,13 @@ impl<'a> StableHashingContext<'a> { &mut self, hash_bodies: bool, owner: LocalDefId, - bodies: &'a SortedMap<hir::ItemLocalId, &'a hir::Body<'a>>, - f: impl FnOnce(&mut Self), + bodies: &SortedMap<hir::ItemLocalId, &hir::Body<'_>>, + f: impl FnOnce(&mut StableHashingContext<'_>), ) { - let prev = self.body_resolver; - self.body_resolver = BodyResolver::Traverse { hash_bodies, owner, bodies }; - f(self); - self.body_resolver = prev; + f(&mut StableHashingContext { + body_resolver: BodyResolver::Traverse { hash_bodies, owner, bodies }, + ..self.clone() + }); } #[inline] |
