Skip to content
Permalink
Browse files

Fix skipped setting of syntax::GLOBALS

  • Loading branch information
Mark-Simulacrum committed Dec 25, 2019
1 parent b98633b commit 4dcc6270e891657906636f72dba57e4a4bac942d
Showing with 4 additions and 2 deletions.
  1. +4 −2 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, &registry)))
})
});
})
});
}

0 comments on commit 4dcc627

Please sign in to comment.
You can’t perform that action at this time.