Skip to content

Commit 1187ccd

Browse files
committed
pacify the parallel compiler
1 parent e68df02 commit 1187ccd

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/librustc/ty/query/job.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -435,11 +435,11 @@ pub unsafe fn handle_deadlock() {
435435
let rustc_span_globals =
436436
rustc_span::GLOBALS.with(|rustc_span_globals| rustc_span_globals as *const _);
437437
let rustc_span_globals = &*rustc_span_globals;
438-
let syntax_globals = syntax::GLOBALS.with(|syntax_globals| syntax_globals as *const _);
438+
let syntax_globals = syntax::attr::GLOBALS.with(|syntax_globals| syntax_globals as *const _);
439439
let syntax_globals = &*syntax_globals;
440440
thread::spawn(move || {
441441
tls::GCX_PTR.set(gcx_ptr, || {
442-
syntax::GLOBALS.set(syntax_globals, || {
442+
syntax::attr::GLOBALS.set(syntax_globals, || {
443443
rustc_span::GLOBALS
444444
.set(rustc_span_globals, || tls::with_global(|tcx| deadlock(tcx, &registry)))
445445
});

src/librustc_interface/util.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -183,15 +183,15 @@ pub fn spawn_thread_pool<F: FnOnce() -> R + Send, R: Send>(
183183

184184
let with_pool = move |pool: &ThreadPool| pool.install(move || f());
185185

186-
syntax::with_globals(edition, || {
187-
syntax::GLOBALS.with(|syntax_globals| {
186+
syntax::attr::with_globals(edition, || {
187+
syntax::attr::GLOBALS.with(|syntax_globals| {
188188
rustc_span::GLOBALS.with(|rustc_span_globals| {
189189
// The main handler runs for each Rayon worker thread and sets up
190190
// the thread local rustc uses. syntax_globals and rustc_span_globals are
191191
// captured and set on the new threads. ty::tls::with_thread_locals sets up
192192
// thread local callbacks from libsyntax
193193
let main_handler = move |thread: ThreadBuilder| {
194-
syntax::GLOBALS.set(syntax_globals, || {
194+
syntax::attr::GLOBALS.set(syntax_globals, || {
195195
rustc_span::GLOBALS.set(rustc_span_globals, || {
196196
if let Some(stderr) = stderr {
197197
io::set_panic(Some(box Sink(stderr.clone())));

0 commit comments

Comments
 (0)