introduce DynSend and DynSync auto trait

This commit is contained in:
SparrowLii 2023-03-03 10:14:57 +08:00
parent 963e5c0eff
commit b9746ce039
26 changed files with 558 additions and 115 deletions

View file

@ -60,6 +60,11 @@ impl Compiler {
}
}
#[allow(rustc::bad_opt_access)]
pub fn set_parallel_mode(sopts: &config::UnstableOptions) {
rustc_data_structures::sync::set(sopts.threads > 1);
}
/// 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 |_| {