From 250c71b85d0eed22982ef2b2db92fd5e63772c42 Mon Sep 17 00:00:00 2001 From: Camille GILLOT Date: Tue, 13 Jul 2021 18:45:20 +0200 Subject: Make AST lowering a query. --- compiler/rustc_query_system/src/ich/hcx.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'compiler/rustc_query_system/src') 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>, - f: impl FnOnce(&mut Self), + bodies: &SortedMap>, + 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] -- cgit 1.4.1-3-g733a5