Rollup merge of #74079 - nnethercote:session-globals, r=nikomatsakis
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` r? @Aaron1011
This commit is contained in:
commit
89c9e970dd
25 changed files with 136 additions and 127 deletions
|
|
@ -19,7 +19,7 @@ use std::path::Path;
|
|||
mod gravy;
|
||||
|
||||
pub fn main() {
|
||||
rustc_ast::with_default_globals(|| parse());
|
||||
rustc_ast::with_default_session_globals(|| parse());
|
||||
|
||||
assert_eq!(gravy::foo(), 10);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ impl MutVisitor for AddParens {
|
|||
}
|
||||
|
||||
fn main() {
|
||||
rustc_ast::with_default_globals(|| run());
|
||||
rustc_ast::with_default_session_globals(|| run());
|
||||
}
|
||||
|
||||
fn run() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue