about summary refs log tree commit diff
path: root/compiler/rustc_parse_format
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2021-05-05 21:31:25 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2021-07-08 16:16:28 +0200
commita2654fb64c9c9d368063b488693d8da17bc9b4e9 (patch)
treee6337d870d12feb89266d5dc2a77214458af7440 /compiler/rustc_parse_format
parent0cd0709f19d316c4796fa71c5f52c8612a5f3771 (diff)
downloadrust-a2654fb64c9c9d368063b488693d8da17bc9b4e9.tar.gz
rust-a2654fb64c9c9d368063b488693d8da17bc9b4e9.zip
Rework SESSION_GLOBALS API to prevent overwriting it
Diffstat (limited to 'compiler/rustc_parse_format')
-rw-r--r--compiler/rustc_parse_format/src/tests.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_parse_format/src/tests.rs b/compiler/rustc_parse_format/src/tests.rs
index 9fd0497fffe..b7693a85ad9 100644
--- a/compiler/rustc_parse_format/src/tests.rs
+++ b/compiler/rustc_parse_format/src/tests.rs
@@ -144,8 +144,7 @@ fn format_align_fill() {
 }
 #[test]
 fn format_counts() {
-    use rustc_span::{edition, SessionGlobals, SESSION_GLOBALS};
-    SESSION_GLOBALS.set(&SessionGlobals::new(edition::DEFAULT_EDITION), || {
+    rustc_span::create_default_session_globals_then(|| {
         same(
             "{:10x}",
             &[NextArgument(Argument {