about summary refs log tree commit diff
path: root/compiler/rustc_interface/src
diff options
context:
space:
mode:
authorJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2023-02-10 03:04:48 +0100
committerJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2023-04-16 05:50:58 +0200
commitefe7cf468f39e810b22e2779f4fafe976e74e563 (patch)
tree76b5fb1342fd3949c568e1a23965f9ad0b761cbe /compiler/rustc_interface/src
parent64474a40b0273557dbea58ca29af9245cbb4ad87 (diff)
downloadrust-efe7cf468f39e810b22e2779f4fafe976e74e563.tar.gz
rust-efe7cf468f39e810b22e2779f4fafe976e74e563.zip
Remove WorkerLocal from AttrIdGenerator
Diffstat (limited to 'compiler/rustc_interface/src')
-rw-r--r--compiler/rustc_interface/src/interface.rs19
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 {