about summary refs log tree commit diff
path: root/src/librustc_interface/interface.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <nnethercote@mozilla.com>2020-07-06 10:53:14 +1000
committerNicholas Nethercote <nnethercote@mozilla.com>2020-07-09 14:11:44 +1000
commit81c5bb6a3fb02d1c1c3a4698e9e0e031ef2f4e4e (patch)
tree1415d42d29241899a5a7ebeef59a556256ab2bb5 /src/librustc_interface/interface.rs
parent2753fab7ce3647033146b07c8b6c9f4856a910b0 (diff)
downloadrust-81c5bb6a3fb02d1c1c3a4698e9e0e031ef2f4e4e.tar.gz
rust-81c5bb6a3fb02d1c1c3a4698e9e0e031ef2f4e4e.zip
Eliminate confusing "globals" terminology.
There are some structures that are called "globals", but are they global
to a compilation session, and not truly global. I have always found this
highly confusing, so this commit renames them as "session globals" and
adds a comment explaining things.

Also, the commit fixes an unnecessary nesting of `set()` calls
`src/librustc_errors/json/tests.rs`
Diffstat (limited to 'src/librustc_interface/interface.rs')
-rw-r--r--src/librustc_interface/interface.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_interface/interface.rs b/src/librustc_interface/interface.rs
index 920cc6021e6..4059022e7a5 100644
--- a/src/librustc_interface/interface.rs
+++ b/src/librustc_interface/interface.rs
@@ -74,7 +74,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_ast::with_default_globals(move || {
+    rustc_ast::with_default_session_globals(move || {
         let cfg = cfgspecs
             .into_iter()
             .map(|s| {