@@ -31,7 +31,9 @@ use rustc_data_structures::tagged_ptr::Tag;
3131use rustc_macros:: { Decodable , Encodable , HashStable_Generic , Walkable } ;
3232pub use rustc_span:: AttrId ;
3333use rustc_span:: source_map:: { Spanned , respan} ;
34- use rustc_span:: { ByteSymbol , DUMMY_SP , ErrorGuaranteed , Ident , Span , Symbol , kw, sym} ;
34+ use rustc_span:: {
35+ ByteSymbol , DUMMY_SP , ErrorGuaranteed , Ident , Span , Symbol , kw, sym, with_session_globals,
36+ } ;
3537use thin_vec:: { ThinVec , thin_vec} ;
3638
3739pub use crate :: format:: * ;
@@ -170,16 +172,18 @@ pub fn join_path_syms(path: impl IntoIterator<Item = impl Borrow<Symbol>>) -> St
170172 let mut s = String :: with_capacity ( len_hint * 8 ) ;
171173
172174 let first_sym = * iter. next ( ) . unwrap ( ) . borrow ( ) ;
173- if first_sym != kw:: PathRoot {
174- s. push_str ( first_sym. as_str ( ) ) ;
175- }
176- for sym in iter {
177- let sym = * sym. borrow ( ) ;
178- debug_assert_ne ! ( sym, kw:: PathRoot ) ;
179- s. push_str ( "::" ) ;
180- s. push_str ( sym. as_str ( ) ) ;
181- }
182- s
175+ with_session_globals ( |globals| {
176+ if first_sym != kw:: PathRoot {
177+ s. push_str ( first_sym. get_str_from_session_globals ( globals) ) ;
178+ }
179+ for sym in iter {
180+ let sym = * sym. borrow ( ) ;
181+ debug_assert_ne ! ( sym, kw:: PathRoot ) ;
182+ s. push_str ( "::" ) ;
183+ s. push_str ( sym. get_str_from_session_globals ( globals) ) ;
184+ }
185+ s
186+ } )
183187}
184188
185189/// Like `join_path_syms`, but for `Ident`s. This function is necessary because
0 commit comments