diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2021-05-05 21:31:25 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2021-07-08 16:16:28 +0200 |
| commit | a2654fb64c9c9d368063b488693d8da17bc9b4e9 (patch) | |
| tree | e6337d870d12feb89266d5dc2a77214458af7440 /compiler/rustc_interface/src/interface.rs | |
| parent | 0cd0709f19d316c4796fa71c5f52c8612a5f3771 (diff) | |
| download | rust-a2654fb64c9c9d368063b488693d8da17bc9b4e9.tar.gz rust-a2654fb64c9c9d368063b488693d8da17bc9b4e9.zip | |
Rework SESSION_GLOBALS API to prevent overwriting it
Diffstat (limited to 'compiler/rustc_interface/src/interface.rs')
| -rw-r--r-- | compiler/rustc_interface/src/interface.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_interface/src/interface.rs b/compiler/rustc_interface/src/interface.rs index a1090ee316d..086c49c7397 100644 --- a/compiler/rustc_interface/src/interface.rs +++ b/compiler/rustc_interface/src/interface.rs @@ -76,7 +76,7 @@ impl Compiler { /// Converts strings provided as `--cfg [cfgspec]` into a `crate_cfg`. pub fn parse_cfgspecs(cfgspecs: Vec<String>) -> FxHashSet<(String, Option<String>)> { - rustc_span::with_default_session_globals(move || { + rustc_span::create_default_session_if_not_set_then(move |_| { let cfg = cfgspecs .into_iter() .map(|s| { |
