From b555ae82bca22045a2e90a27ce665be48b2570d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20K=C3=A5re=20Alsaker?= Date: Sun, 1 Oct 2023 07:31:21 +0200 Subject: [PATCH] Rename `current_gcx_` --- compiler/rustc_interface/src/util.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/compiler/rustc_interface/src/util.rs b/compiler/rustc_interface/src/util.rs index e84e8fffbe41..4df8df7283d7 100644 --- a/compiler/rustc_interface/src/util.rs +++ b/compiler/rustc_interface/src/util.rs @@ -205,9 +205,8 @@ pub(crate) fn run_in_thread_pool_with_globals R + Send, }); } - let current_gcx = CurrentGcx::new(); - let current_gcx_ = FromDyn::from(current_gcx.clone()); - let current_gcx = FromDyn::from(current_gcx); + let current_gcx = FromDyn::from(CurrentGcx::new()); + let current_gcx2 = current_gcx.clone(); let mut builder = rayon::ThreadPoolBuilder::new() .thread_name(|_| "rustc".to_string()) @@ -220,7 +219,7 @@ pub(crate) fn run_in_thread_pool_with_globals R + Send, // Get a `GlobalCtxt` reference from `CurrentGcx` as we cannot rely on having a // `TyCtxt` TLS reference here. - let query_map = current_gcx_.access(|gcx| { + let query_map = current_gcx2.access(|gcx| { tls::enter_context(&tls::ImplicitCtxt::new(gcx), || { tls::with(|tcx| { QueryCtxt::new(tcx)