Skip to content

Commit 4dcc627

Browse files
Fix skipped setting of syntax::GLOBALS
1 parent b98633b commit 4dcc627

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/librustc/ty/query/job.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -435,12 +435,14 @@ pub unsafe fn handle_deadlock() {
435435
let syntax_pos_globals =
436436
syntax_pos::GLOBALS.with(|syntax_pos_globals| syntax_pos_globals as *const _);
437437
let syntax_pos_globals = &*syntax_pos_globals;
438+
let syntax_globals = syntax::GLOBALS.with(|syntax_globals| syntax_globals as *const _);
439+
let syntax_globals = &*syntax_globals;
438440
thread::spawn(move || {
439441
tls::GCX_PTR.set(gcx_ptr, || {
440-
syntax_pos::GLOBALS.set(syntax_pos_globals, || {
442+
syntax::GLOBALS.set(syntax_globals, || {
441443
syntax_pos::GLOBALS
442444
.set(syntax_pos_globals, || tls::with_global(|tcx| deadlock(tcx, &registry)))
443-
})
445+
});
444446
})
445447
});
446448
}

0 commit comments

Comments
 (0)