Skip to content

Commit b555ae8

Browse files
committed
Rename current_gcx_
1 parent 3bb7aa3 commit b555ae8

File tree

1 file changed

+3
-4
lines changed
  • compiler/rustc_interface/src

1 file changed

+3
-4
lines changed

compiler/rustc_interface/src/util.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,8 @@ pub(crate) fn run_in_thread_pool_with_globals<F: FnOnce(CurrentGcx) -> R + Send,
205205
});
206206
}
207207

208-
let current_gcx = CurrentGcx::new();
209-
let current_gcx_ = FromDyn::from(current_gcx.clone());
210-
let current_gcx = FromDyn::from(current_gcx);
208+
let current_gcx = FromDyn::from(CurrentGcx::new());
209+
let current_gcx2 = current_gcx.clone();
211210

212211
let mut builder = rayon::ThreadPoolBuilder::new()
213212
.thread_name(|_| "rustc".to_string())
@@ -220,7 +219,7 @@ pub(crate) fn run_in_thread_pool_with_globals<F: FnOnce(CurrentGcx) -> R + Send,
220219

221220
// Get a `GlobalCtxt` reference from `CurrentGcx` as we cannot rely on having a
222221
// `TyCtxt` TLS reference here.
223-
let query_map = current_gcx_.access(|gcx| {
222+
let query_map = current_gcx2.access(|gcx| {
224223
tls::enter_context(&tls::ImplicitCtxt::new(gcx), || {
225224
tls::with(|tcx| {
226225
QueryCtxt::new(tcx)

0 commit comments

Comments
 (0)