/// Converts strings provided as `--cfg [cfgspec]` into a `crate_cfg`.
pub fn parse_cfgspecs(cfgspecs: Vec<String>) -> FxHashSet<(String, Option<String>)> {
- syntax::attr::with_default_globals(move || {
+ syntax::with_default_globals(move || {
let cfg = cfgspecs
.into_iter()
.map(|s| {
crate::callbacks::setup_callbacks();
scoped_thread(cfg, || {
- syntax::attr::with_globals(edition, || {
+ syntax::with_globals(edition, || {
ty::tls::GCX_PTR.set(&Lock::new(0), || {
if let Some(stderr) = stderr {
io::set_panic(Some(box Sink(stderr.clone())));
let with_pool = move |pool: &ThreadPool| pool.install(move || f());
- syntax::attr::with_globals(edition, || {
- syntax::attr::GLOBALS.with(|syntax_globals| {
+ syntax::with_globals(edition, || {
+ syntax::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::attr::GLOBALS.set(syntax_globals, || {
+ syntax::GLOBALS.set(syntax_globals, || {
rustc_span::GLOBALS.set(rustc_span_globals, || {
if let Some(stderr) = stderr {
io::set_panic(Some(box Sink(stderr.clone())));
use std::process::{self, Command, Stdio};
use std::str;
use syntax::ast;
-use syntax::attr::with_globals;
+use syntax::with_globals;
use tempfile::Builder as TempFileBuilder;
use testing;