@@ -25,6 +25,7 @@ use rustc_middle::bug;
25
25
use rustc_middle:: ty:: fast_reject:: { DeepRejectCtxt , TreatParams , simplify_type} ;
26
26
use rustc_middle:: ty:: print:: {
27
27
PrintTraitRefExt as _, with_crate_prefix, with_forced_trimmed_paths,
28
+ with_no_visible_paths_if_doc_hidden,
28
29
} ;
29
30
use rustc_middle:: ty:: { self , GenericArgKind , IsSuggestable , Ty , TyCtxt , TypeVisitableExt } ;
30
31
use rustc_span:: def_id:: DefIdSet ;
@@ -3328,15 +3329,19 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
3328
3329
let path_strings = candidates. iter ( ) . map ( |trait_did| {
3329
3330
format ! (
3330
3331
"{prefix}{}{postfix}\n " ,
3331
- with_crate_prefix!( self . tcx. def_path_str( * trait_did) ) ,
3332
+ with_no_visible_paths_if_doc_hidden!( with_crate_prefix!(
3333
+ self . tcx. def_path_str( * trait_did)
3334
+ ) ) ,
3332
3335
)
3333
3336
} ) ;
3334
3337
3335
3338
let glob_path_strings = globs. iter ( ) . map ( |trait_did| {
3336
3339
let parent_did = parent_map. get ( trait_did) . unwrap ( ) ;
3337
3340
format ! (
3338
3341
"{prefix}{}::*{postfix} // trait {}\n " ,
3339
- with_crate_prefix!( self . tcx. def_path_str( * parent_did) ) ,
3342
+ with_no_visible_paths_if_doc_hidden!( with_crate_prefix!(
3343
+ self . tcx. def_path_str( * parent_did)
3344
+ ) ) ,
3340
3345
self . tcx. item_name( * trait_did) ,
3341
3346
)
3342
3347
} ) ;
0 commit comments