@@ -18,7 +18,7 @@ use std::rc::Rc;
18
18
use super :: {
19
19
collect_paths_for_type, document, ensure_trailing_slash, item_ty_to_section,
20
20
notable_traits_decl, render_assoc_item, render_assoc_items, render_attributes_in_code,
21
- render_attributes_in_pre, render_impl, render_stability_since_raw , write_srclink ,
21
+ render_attributes_in_pre, render_impl, render_rightside , render_stability_since_raw ,
22
22
AssocItemLink , Context , ImplRenderingParameters ,
23
23
} ;
24
24
use crate :: clean;
@@ -709,14 +709,7 @@ fn item_trait(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &clean:
709
709
write ! ( w, "<details class=\" rustdoc-toggle\" open><summary>" ) ;
710
710
}
711
711
write ! ( w, "<div id=\" {}\" class=\" method has-srclink\" >" , id) ;
712
- write ! ( w, "<div class=\" rightside\" >" ) ;
713
-
714
- let has_stability = render_stability_since ( w, m, t, cx. tcx ( ) ) ;
715
- if has_stability {
716
- w. write_str ( " · " ) ;
717
- }
718
- write_srclink ( cx, m, w) ;
719
- write ! ( w, "</div>" ) ;
712
+ render_rightside ( w, cx, m, t, RenderMode :: Normal ) ;
720
713
write ! ( w, "<h4 class=\" code-header\" >" ) ;
721
714
render_assoc_item (
722
715
w,
@@ -1260,7 +1253,13 @@ fn item_enum(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, e: &clean::
1260
1253
w. write_str ( ")" ) ;
1261
1254
}
1262
1255
w. write_str ( "</code>" ) ;
1263
- render_stability_since ( w, variant, it, cx. tcx ( ) ) ;
1256
+ render_stability_since_raw (
1257
+ w,
1258
+ variant. stable_since ( cx. tcx ( ) ) ,
1259
+ variant. const_stability ( cx. tcx ( ) ) ,
1260
+ it. stable_since ( cx. tcx ( ) ) ,
1261
+ it. const_stable_since ( cx. tcx ( ) ) ,
1262
+ ) ;
1264
1263
w. write_str ( "</h3>" ) ;
1265
1264
1266
1265
use crate :: clean:: Variant ;
@@ -1591,21 +1590,6 @@ where
1591
1590
w. write_str ( "</code></pre>" ) ;
1592
1591
}
1593
1592
1594
- fn render_stability_since (
1595
- w : & mut Buffer ,
1596
- item : & clean:: Item ,
1597
- containing_item : & clean:: Item ,
1598
- tcx : TyCtxt < ' _ > ,
1599
- ) -> bool {
1600
- render_stability_since_raw (
1601
- w,
1602
- item. stable_since ( tcx) ,
1603
- item. const_stability ( tcx) ,
1604
- containing_item. stable_since ( tcx) ,
1605
- containing_item. const_stable_since ( tcx) ,
1606
- )
1607
- }
1608
-
1609
1593
fn compare_impl < ' a , ' b > ( lhs : & ' a & & Impl , rhs : & ' b & & Impl , cx : & Context < ' _ > ) -> Ordering {
1610
1594
let lhss = format ! ( "{}" , lhs. inner_impl( ) . print( false , cx) ) ;
1611
1595
let rhss = format ! ( "{}" , rhs. inner_impl( ) . print( false , cx) ) ;
0 commit comments