@@ -413,15 +413,15 @@ fn item_module(cx: &Context<'_>, item: &clean::Item, items: &[clean::Item]) -> i
413
413
414
414
match myitem. kind {
415
415
clean:: ExternCrateItem { ref src } => {
416
- use crate :: html:: format:: anchor ;
416
+ use crate :: html:: format:: print_anchor ;
417
417
418
418
match * src {
419
419
Some ( src) => {
420
420
write ! (
421
421
w,
422
422
"<dt><code>{}extern crate {} as {};" ,
423
423
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) ,
425
425
EscapeBodyTextWithWbr ( myitem. name. unwrap( ) . as_str( ) )
426
426
) ?;
427
427
}
@@ -430,7 +430,11 @@ fn item_module(cx: &Context<'_>, item: &clean::Item, items: &[clean::Item]) -> i
430
430
w,
431
431
"<dt><code>{}extern crate {};" ,
432
432
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
+ )
434
438
) ?;
435
439
}
436
440
}
@@ -439,7 +443,7 @@ fn item_module(cx: &Context<'_>, item: &clean::Item, items: &[clean::Item]) -> i
439
443
440
444
clean:: ImportItem ( ref import) => {
441
445
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 ( )
443
447
} ) ;
444
448
445
449
let id = match import. kind {
@@ -497,19 +501,22 @@ fn item_module(cx: &Context<'_>, item: &clean::Item, items: &[clean::Item]) -> i
497
501
write ! (
498
502
w,
499
503
"<dt>\
500
- <a class=\" {class}\" href=\" {href}\" title=\" {title}\" >{name}</a>\
504
+ <a class=\" {class}\" href=\" {href}\" title=\" {title1} {title2}\" >\
505
+ {name}\
506
+ </a>\
501
507
{visibility_and_hidden}\
502
508
{unsafety_flag}\
503
509
{stab_tags}\
504
510
</dt>\
505
511
{docs_before}{docs}{docs_after}",
506
512
name = EscapeBodyTextWithWbr ( myitem. name. unwrap( ) . as_str( ) ) ,
507
513
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 ) ,
509
515
class = myitem. type_( ) ,
510
516
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) ,
513
520
) ?;
514
521
}
515
522
}
@@ -524,7 +531,7 @@ fn item_module(cx: &Context<'_>, item: &clean::Item, items: &[clean::Item]) -> i
524
531
525
532
/// Render the stability, deprecation and portability tags that are displayed in the item's summary
526
533
/// at the module level.
527
- fn extra_info_tags (
534
+ fn print_extra_info_tags (
528
535
tcx : TyCtxt < ' _ > ,
529
536
item : & clean:: Item ,
530
537
parent : & clean:: Item ,
@@ -639,7 +646,7 @@ fn item_function(cx: &Context<'_>, it: &clean::Item, f: &clean::Function) -> imp
639
646
fn item_trait ( cx : & Context < ' _ > , it : & clean:: Item , t : & clean:: Trait ) -> impl fmt:: Display {
640
647
fmt:: from_fn ( |w| {
641
648
let tcx = cx. tcx ( ) ;
642
- let bounds = bounds ( & t. bounds , false , cx) ;
649
+ let bounds = print_bounds ( & t. bounds , false , cx) ;
643
650
let required_types =
644
651
t. items . iter ( ) . filter ( |m| m. is_required_associated_type ( ) ) . collect :: < Vec < _ > > ( ) ;
645
652
let provided_types = t. items . iter ( ) . filter ( |m| m. is_associated_type ( ) ) . collect :: < Vec < _ > > ( ) ;
@@ -1236,7 +1243,7 @@ fn item_trait_alias(
1236
1243
attrs = render_attributes_in_pre( it, "" , cx) ,
1237
1244
name = it. name. unwrap( ) ,
1238
1245
generics = t. generics. print( cx) ,
1239
- bounds = bounds ( & t. bounds, true , cx) ,
1246
+ bounds = print_bounds ( & t. bounds, true , cx) ,
1240
1247
where_clause =
1241
1248
print_where_clause( & t. generics, cx, 0 , Ending :: NoNewline ) . maybe_display( ) ,
1242
1249
)
@@ -2185,14 +2192,18 @@ pub(super) fn full_path(cx: &Context<'_>, item: &clean::Item) -> String {
2185
2192
s
2186
2193
}
2187
2194
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 {
2189
2196
fmt:: from_fn ( move |f| match ty {
2190
2197
ItemType :: Module => write ! ( f, "{}index.html" , ensure_trailing_slash( name) ) ,
2191
2198
_ => write ! ( f, "{ty}.{name}.html" ) ,
2192
2199
} )
2193
2200
}
2194
2201
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 {
2196
2207
( !bounds. is_empty ( ) )
2197
2208
. then_some ( fmt:: from_fn ( move |f| {
2198
2209
let has_lots_of_bounds = bounds. len ( ) > 2 ;
0 commit comments