about summary refs log tree commit diff
path: root/src/librustdoc/test.rs
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2020-07-09 11:50:32 -0700
committerGitHub <noreply@github.com>2020-07-09 11:50:32 -0700
commit89c9e970ddbe47622bcc52b135d35508510daa55 (patch)
treea3d85f853606c2815705ac3b240022efdc4faac2 /src/librustdoc/test.rs
parent07301e3d549f3f41a3d0a9f31aade293a3b9a3af (diff)
parent81c5bb6a3fb02d1c1c3a4698e9e0e031ef2f4e4e (diff)
downloadrust-89c9e970ddbe47622bcc52b135d35508510daa55.tar.gz
rust-89c9e970ddbe47622bcc52b135d35508510daa55.zip
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
Diffstat (limited to 'src/librustdoc/test.rs')
-rw-r--r--src/librustdoc/test.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/librustdoc/test.rs b/src/librustdoc/test.rs
index a89cb130c6b..b40a5ef5950 100644
--- a/src/librustdoc/test.rs
+++ b/src/librustdoc/test.rs
@@ -1,5 +1,4 @@
 use rustc_ast::ast;
-use rustc_ast::with_globals;
 use rustc_data_structures::sync::Lrc;
 use rustc_errors::ErrorReported;
 use rustc_feature::UnstableFeatures;
@@ -399,7 +398,7 @@ pub fn make_test(
     // Uses librustc_ast to parse the doctest and find if there's a main fn and the extern
     // crate already is included.
     let result = rustc_driver::catch_fatal_errors(|| {
-        with_globals(edition, || {
+        rustc_ast::with_session_globals(edition, || {
             use rustc_errors::emitter::EmitterWriter;
             use rustc_errors::Handler;
             use rustc_parse::maybe_new_parser_from_source_str;