From 154040097d4de3359fef3a8f7641715b3713fa8c Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Fri, 17 Jan 2020 14:42:27 +0100 Subject: [PATCH] pacify the parallel compiler --- src/librustc/ty/query/job.rs | 4 ++-- src/librustc_interface/util.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/librustc/ty/query/job.rs b/src/librustc/ty/query/job.rs index dd8274dcf22..393125f278c 100644 --- a/src/librustc/ty/query/job.rs +++ b/src/librustc/ty/query/job.rs @@ -435,11 +435,11 @@ pub unsafe fn handle_deadlock() { let rustc_span_globals = rustc_span::GLOBALS.with(|rustc_span_globals| rustc_span_globals as *const _); let rustc_span_globals = &*rustc_span_globals; - let syntax_globals = syntax::GLOBALS.with(|syntax_globals| syntax_globals as *const _); + let syntax_globals = syntax::attr::GLOBALS.with(|syntax_globals| syntax_globals as *const _); let syntax_globals = &*syntax_globals; thread::spawn(move || { tls::GCX_PTR.set(gcx_ptr, || { - syntax::GLOBALS.set(syntax_globals, || { + syntax::attr::GLOBALS.set(syntax_globals, || { rustc_span::GLOBALS .set(rustc_span_globals, || tls::with_global(|tcx| deadlock(tcx, ®istry))) }); diff --git a/src/librustc_interface/util.rs b/src/librustc_interface/util.rs index 842b702be2a..3f59a0ca34a 100644 --- a/src/librustc_interface/util.rs +++ b/src/librustc_interface/util.rs @@ -183,15 +183,15 @@ pub fn spawn_thread_pool R + Send, R: Send>( let with_pool = move |pool: &ThreadPool| pool.install(move || f()); - syntax::with_globals(edition, || { - syntax::GLOBALS.with(|syntax_globals| { + syntax::attr::with_globals(edition, || { + syntax::attr::GLOBALS.with(|syntax_globals| { rustc_span::GLOBALS.with(|rustc_span_globals| { // The main handler runs for each Rayon worker thread and sets up // the thread local rustc uses. syntax_globals and rustc_span_globals are // captured and set on the new threads. ty::tls::with_thread_locals sets up // thread local callbacks from libsyntax let main_handler = move |thread: ThreadBuilder| { - syntax::GLOBALS.set(syntax_globals, || { + syntax::attr::GLOBALS.set(syntax_globals, || { rustc_span::GLOBALS.set(rustc_span_globals, || { if let Some(stderr) = stderr { io::set_panic(Some(box Sink(stderr.clone())));