@@ -413,15 +413,15 @@ fn item_module(cx: &Context<'_>, item: &clean::Item, items: &[clean::Item]) -> i
413413
414414 match myitem. kind {
415415 clean:: ExternCrateItem { ref src } => {
416- use crate :: html:: format:: anchor ;
416+ use crate :: html:: format:: print_anchor ;
417417
418418 match * src {
419419 Some ( src) => {
420420 write ! (
421421 w,
422422 "<dt><code>{}extern crate {} as {};" ,
423423 visibility_print_with_space( myitem, cx) ,
424- anchor ( myitem. item_id. expect_def_id( ) , src, cx) ,
424+ print_anchor ( myitem. item_id. expect_def_id( ) , src, cx) ,
425425 EscapeBodyTextWithWbr ( myitem. name. unwrap( ) . as_str( ) )
426426 ) ?;
427427 }
@@ -430,7 +430,11 @@ fn item_module(cx: &Context<'_>, item: &clean::Item, items: &[clean::Item]) -> i
430430 w,
431431 "<dt><code>{}extern crate {};" ,
432432 visibility_print_with_space( myitem, cx) ,
433- anchor( myitem. item_id. expect_def_id( ) , myitem. name. unwrap( ) , cx)
433+ print_anchor(
434+ myitem. item_id. expect_def_id( ) ,
435+ myitem. name. unwrap( ) ,
436+ cx
437+ )
434438 ) ?;
435439 }
436440 }
@@ -439,7 +443,7 @@ fn item_module(cx: &Context<'_>, item: &clean::Item, items: &[clean::Item]) -> i
439443
440444 clean:: ImportItem ( ref import) => {
441445 let stab_tags = import. source . did . map_or_else ( String :: new, |import_def_id| {
442- extra_info_tags ( tcx, myitem, item, Some ( import_def_id) ) . to_string ( )
446+ print_extra_info_tags ( tcx, myitem, item, Some ( import_def_id) ) . to_string ( )
443447 } ) ;
444448
445449 let id = match import. kind {
@@ -497,19 +501,22 @@ fn item_module(cx: &Context<'_>, item: &clean::Item, items: &[clean::Item]) -> i
497501 write ! (
498502 w,
499503 "<dt>\
500- <a class=\" {class}\" href=\" {href}\" title=\" {title}\" >{name}</a>\
504+ <a class=\" {class}\" href=\" {href}\" title=\" {title1} {title2}\" >\
505+ {name}\
506+ </a>\
501507 {visibility_and_hidden}\
502508 {unsafety_flag}\
503509 {stab_tags}\
504510 </dt>\
505511 {docs_before}{docs}{docs_after}",
506512 name = EscapeBodyTextWithWbr ( myitem. name. unwrap( ) . as_str( ) ) ,
507513 visibility_and_hidden = visibility_and_hidden,
508- stab_tags = extra_info_tags ( tcx, myitem, item, None ) ,
514+ stab_tags = print_extra_info_tags ( tcx, myitem, item, None ) ,
509515 class = myitem. type_( ) ,
510516 unsafety_flag = unsafety_flag,
511- href = item_path( myitem. type_( ) , myitem. name. unwrap( ) . as_str( ) ) ,
512- title = format_args!( "{} {}" , myitem. type_( ) , full_path( cx, myitem) ) ,
517+ href = print_item_path( myitem. type_( ) , myitem. name. unwrap( ) . as_str( ) ) ,
518+ title1 = myitem. type_( ) ,
519+ title2 = full_path( cx, myitem) ,
513520 ) ?;
514521 }
515522 }
@@ -524,7 +531,7 @@ fn item_module(cx: &Context<'_>, item: &clean::Item, items: &[clean::Item]) -> i
524531
525532/// Render the stability, deprecation and portability tags that are displayed in the item's summary
526533/// at the module level.
527- fn extra_info_tags (
534+ fn print_extra_info_tags (
528535 tcx : TyCtxt < ' _ > ,
529536 item : & clean:: Item ,
530537 parent : & clean:: Item ,
@@ -639,7 +646,7 @@ fn item_function(cx: &Context<'_>, it: &clean::Item, f: &clean::Function) -> imp
639646fn item_trait ( cx : & Context < ' _ > , it : & clean:: Item , t : & clean:: Trait ) -> impl fmt:: Display {
640647 fmt:: from_fn ( |w| {
641648 let tcx = cx. tcx ( ) ;
642- let bounds = bounds ( & t. bounds , false , cx) ;
649+ let bounds = print_bounds ( & t. bounds , false , cx) ;
643650 let required_types =
644651 t. items . iter ( ) . filter ( |m| m. is_required_associated_type ( ) ) . collect :: < Vec < _ > > ( ) ;
645652 let provided_types = t. items . iter ( ) . filter ( |m| m. is_associated_type ( ) ) . collect :: < Vec < _ > > ( ) ;
@@ -1236,7 +1243,7 @@ fn item_trait_alias(
12361243 attrs = render_attributes_in_pre( it, "" , cx) ,
12371244 name = it. name. unwrap( ) ,
12381245 generics = t. generics. print( cx) ,
1239- bounds = bounds ( & t. bounds, true , cx) ,
1246+ bounds = print_bounds ( & t. bounds, true , cx) ,
12401247 where_clause =
12411248 print_where_clause( & t. generics, cx, 0 , Ending :: NoNewline ) . maybe_display( ) ,
12421249 )
@@ -2185,14 +2192,18 @@ pub(super) fn full_path(cx: &Context<'_>, item: &clean::Item) -> String {
21852192 s
21862193}
21872194
2188- pub ( super ) fn item_path ( ty : ItemType , name : & str ) -> impl Display {
2195+ pub ( super ) fn print_item_path ( ty : ItemType , name : & str ) -> impl Display {
21892196 fmt:: from_fn ( move |f| match ty {
21902197 ItemType :: Module => write ! ( f, "{}index.html" , ensure_trailing_slash( name) ) ,
21912198 _ => write ! ( f, "{ty}.{name}.html" ) ,
21922199 } )
21932200}
21942201
2195- fn bounds ( bounds : & [ clean:: GenericBound ] , trait_alias : bool , cx : & Context < ' _ > ) -> impl Display {
2202+ fn print_bounds (
2203+ bounds : & [ clean:: GenericBound ] ,
2204+ trait_alias : bool ,
2205+ cx : & Context < ' _ > ,
2206+ ) -> impl Display {
21962207 ( !bounds. is_empty ( ) )
21972208 . then_some ( fmt:: from_fn ( move |f| {
21982209 let has_lots_of_bounds = bounds. len ( ) > 2 ;
0 commit comments