@@ -18,7 +18,7 @@ use std::rc::Rc;
1818use super :: {
1919 collect_paths_for_type, document, ensure_trailing_slash, item_ty_to_section,
2020 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 ,
2222 AssocItemLink , Context , ImplRenderingParameters ,
2323} ;
2424use crate :: clean;
@@ -709,14 +709,7 @@ fn item_trait(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &clean:
709709 write ! ( w, "<details class=\" rustdoc-toggle\" open><summary>" ) ;
710710 }
711711 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 ) ;
720713 write ! ( w, "<h4 class=\" code-header\" >" ) ;
721714 render_assoc_item (
722715 w,
@@ -1260,7 +1253,13 @@ fn item_enum(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, e: &clean::
12601253 w. write_str ( ")" ) ;
12611254 }
12621255 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+ ) ;
12641263 w. write_str ( "</h3>" ) ;
12651264
12661265 use crate :: clean:: Variant ;
@@ -1591,21 +1590,6 @@ where
15911590 w. write_str ( "</code></pre>" ) ;
15921591}
15931592
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-
16091593fn compare_impl < ' a , ' b > ( lhs : & ' a & & Impl , rhs : & ' b & & Impl , cx : & Context < ' _ > ) -> Ordering {
16101594 let lhss = format ! ( "{}" , lhs. inner_impl( ) . print( false , cx) ) ;
16111595 let rhss = format ! ( "{}" , rhs. inner_impl( ) . print( false , cx) ) ;
0 commit comments