about summary refs log tree commit diff
path: root/compiler/rustc_ast_pretty/src/pprust
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_ast_pretty/src/pprust
parent0cd0709f19d316c4796fa71c5f52c8612a5f3771 (diff)
downloadrust-a2654fb64c9c9d368063b488693d8da17bc9b4e9.tar.gz
rust-a2654fb64c9c9d368063b488693d8da17bc9b4e9.zip
Rework SESSION_GLOBALS API to prevent overwriting it
Diffstat (limited to 'compiler/rustc_ast_pretty/src/pprust')
-rw-r--r--compiler/rustc_ast_pretty/src/pprust/tests.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_ast_pretty/src/pprust/tests.rs b/compiler/rustc_ast_pretty/src/pprust/tests.rs
index 8abd85a5a52..6c8d42f33eb 100644
--- a/compiler/rustc_ast_pretty/src/pprust/tests.rs
+++ b/compiler/rustc_ast_pretty/src/pprust/tests.rs
@@ -1,8 +1,8 @@
 use super::*;
 
 use rustc_ast as ast;
+use rustc_span::create_default_session_globals_then;
 use rustc_span::symbol::Ident;
-use rustc_span::with_default_session_globals;
 
 fn fun_to_string(
     decl: &ast::FnDecl,
@@ -24,7 +24,7 @@ fn variant_to_string(var: &ast::Variant) -> String {
 
 #[test]
 fn test_fun_to_string() {
-    with_default_session_globals(|| {
+    create_default_session_globals_then(|| {
         let abba_ident = Ident::from_str("abba");
 
         let decl =
@@ -39,7 +39,7 @@ fn test_fun_to_string() {
 
 #[test]
 fn test_variant_to_string() {
-    with_default_session_globals(|| {
+    create_default_session_globals_then(|| {
         let ident = Ident::from_str("principal_skinner");
 
         let var = ast::Variant {