@@ -10,7 +10,9 @@ use rustc_hir::{Attribute, LangItem};
1010use rustc_middle:: mir:: interpret:: { AllocId , ConstAllocation , ErrorHandled , GlobalAlloc , Scalar } ;
1111use rustc_middle:: mir:: { BinOp , Body , Const as MirConst , ConstValue , UnOp } ;
1212use rustc_middle:: ty:: layout:: { FnAbiOf , LayoutOf } ;
13- use rustc_middle:: ty:: print:: { with_forced_trimmed_paths, with_resolve_crate_name} ;
13+ use rustc_middle:: ty:: print:: {
14+ with_forced_trimmed_paths, with_no_trimmed_paths, with_resolve_crate_name,
15+ } ;
1416use rustc_middle:: ty:: util:: Discr ;
1517use rustc_middle:: ty:: {
1618 AdtDef , AdtKind , AssocItem , Binder , ClosureKind , CoroutineArgsExt , EarlyBinder ,
@@ -265,7 +267,7 @@ impl<'tcx, B: Bridge> CompilerCtxt<'tcx, B> {
265267 with_forced_trimmed_paths ! ( self . tcx. def_path_str( def_id) )
266268 } else {
267269 // For local definitions, we need to prepend with crate name.
268- with_resolve_crate_name ! ( self . tcx. def_path_str( def_id) )
270+ with_resolve_crate_name ! ( with_no_trimmed_paths! ( self . tcx. def_path_str( def_id) ) )
269271 }
270272 }
271273
@@ -720,9 +722,9 @@ impl<'tcx, B: Bridge> CompilerCtxt<'tcx, B> {
720722 self . tcx. def_path_str_with_args( instance. def_id( ) , instance. args)
721723 )
722724 } else {
723- with_resolve_crate_name ! (
725+ with_resolve_crate_name ! ( with_no_trimmed_paths! (
724726 self . tcx. def_path_str_with_args( instance. def_id( ) , instance. args)
725- )
727+ ) )
726728 }
727729 }
728730
0 commit comments