Skip to content

Commit

Permalink
Fix skipped setting of syntax::GLOBALS
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark-Simulacrum committed Dec 25, 2019
1 parent b98633b commit 4dcc627
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/librustc/ty/query/job.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
})
});
})
});
}
Expand Down

0 comments on commit 4dcc627

Please sign in to comment.