From 4dcc6270e891657906636f72dba57e4a4bac942d Mon Sep 17 00:00:00 2001 From: Mark Rousskov Date: Wed, 25 Dec 2019 13:41:30 -0500 Subject: [PATCH] Fix skipped setting of syntax::GLOBALS --- src/librustc/ty/query/job.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/librustc/ty/query/job.rs b/src/librustc/ty/query/job.rs index f8bae1673d208..fbcbfae9f8f4f 100644 --- a/src/librustc/ty/query/job.rs +++ b/src/librustc/ty/query/job.rs @@ -435,12 +435,14 @@ pub unsafe fn handle_deadlock() { let syntax_pos_globals = syntax_pos::GLOBALS.with(|syntax_pos_globals| syntax_pos_globals as *const _); let syntax_pos_globals = &*syntax_pos_globals; + let syntax_globals = syntax::GLOBALS.with(|syntax_globals| syntax_globals as *const _); + let syntax_globals = &*syntax_globals; thread::spawn(move || { tls::GCX_PTR.set(gcx_ptr, || { - syntax_pos::GLOBALS.set(syntax_pos_globals, || { + syntax::GLOBALS.set(syntax_globals, || { syntax_pos::GLOBALS .set(syntax_pos_globals, || tls::with_global(|tcx| deadlock(tcx, ®istry))) - }) + }); }) }); }