diff options
Diffstat (limited to 'compiler/rustc_interface/src')
| -rw-r--r-- | compiler/rustc_interface/src/interface.rs | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/compiler/rustc_interface/src/interface.rs b/compiler/rustc_interface/src/interface.rs index 577a1034307..be7fa9378ca 100644 --- a/compiler/rustc_interface/src/interface.rs +++ b/compiler/rustc_interface/src/interface.rs @@ -19,7 +19,6 @@ use rustc_session::Session; use rustc_session::{early_error, CompilerIO}; use rustc_span::source_map::{FileLoader, FileName}; use rustc_span::symbol::sym; -use std::cell::OnceCell; use std::path::PathBuf; use std::result; @@ -59,25 +58,9 @@ impl Compiler { } } -fn registry_setup() { - thread_local! { - static ONCE: OnceCell<()> = OnceCell::new(); - } - - // Create a dummy registry to allow `WorkerLocal` construction. - // We use `OnceCell` so we only register one dummy registry per thread. - ONCE.with(|once| { - once.get_or_init(|| { - rustc_data_structures::sync::Registry::new(1).register(); - }); - }); -} - /// Converts strings provided as `--cfg [cfgspec]` into a `crate_cfg`. pub fn parse_cfgspecs(cfgspecs: Vec<String>) -> FxHashSet<(String, Option<String>)> { rustc_span::create_default_session_if_not_set_then(move |_| { - registry_setup(); - let cfg = cfgspecs .into_iter() .map(|s| { @@ -137,8 +120,6 @@ pub fn parse_cfgspecs(cfgspecs: Vec<String>) -> FxHashSet<(String, Option<String /// Converts strings provided as `--check-cfg [specs]` into a `CheckCfg`. pub fn parse_check_cfg(specs: Vec<String>) -> CheckCfg { rustc_span::create_default_session_if_not_set_then(move |_| { - registry_setup(); - let mut cfg = CheckCfg::default(); 'specs: for s in specs { |
