diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-01-19 14:12:29 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-01-23 10:35:21 +0000 |
| commit | 261bbd7dbaaeb3a4f3d25610b6f93aac874bd910 (patch) | |
| tree | e63e6568484e1f4b160292ea52bff8a186191599 /compiler/rustc_interface/src | |
| parent | 3ddb54f1554c9f1eccc8d0e9315a78d2178ad5aa (diff) | |
| download | rust-261bbd7dbaaeb3a4f3d25610b6f93aac874bd910.tar.gz rust-261bbd7dbaaeb3a4f3d25610b6f93aac874bd910.zip | |
Store the gctxt instead of fetching it twice.
Diffstat (limited to 'compiler/rustc_interface/src')
| -rw-r--r-- | compiler/rustc_interface/src/queries.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_interface/src/queries.rs b/compiler/rustc_interface/src/queries.rs index 96cd3b06321..4b0180741c1 100644 --- a/compiler/rustc_interface/src/queries.rs +++ b/compiler/rustc_interface/src/queries.rs @@ -65,7 +65,7 @@ impl<'a, T> std::ops::DerefMut for QueryResult<'a, T> { } impl<'a, 'tcx> QueryResult<'a, QueryContext<'tcx>> { - pub fn enter<T>(mut self, f: impl FnOnce(TyCtxt<'tcx>) -> T) -> T { + pub fn enter<T>(&mut self, f: impl FnOnce(TyCtxt<'tcx>) -> T) -> T { (*self.0).get_mut().enter(f) } } |
