@@ -1655,8 +1655,13 @@ fn document_full(w: &mut fmt::Formatter, item: &clean::Item) -> fmt::Result {
16551655}
16561656
16571657fn document_stability ( w : & mut fmt:: Formatter , cx : & Context , item : & clean:: Item ) -> fmt:: Result {
1658- for stability in short_stability ( item, cx, true ) {
1659- write ! ( w, "<div class='stability'>{}</div>" , stability) ?;
1658+ let stabilities = short_stability ( item, cx, true ) ;
1659+ if !stabilities. is_empty ( ) {
1660+ write ! ( w, "<div class='stability'>" ) ?;
1661+ for stability in stabilities {
1662+ write ! ( w, "{}" , stability) ?;
1663+ }
1664+ write ! ( w, "</div>" ) ?;
16601665 }
16611666 Ok ( ( ) )
16621667}
@@ -1855,7 +1860,7 @@ fn short_stability(item: &clean::Item, cx: &Context, show_reason: bool) -> Vec<S
18551860 String :: new ( )
18561861 } ;
18571862 let text = format ! ( "Deprecated{}{}" , since, Markdown ( & deprecated_reason) ) ;
1858- stability. push ( format ! ( "<em class='stab deprecated'>{}</em >" , text) )
1863+ stability. push ( format ! ( "<div class='stab deprecated'>{}</div >" , text) )
18591864 } ;
18601865
18611866 if stab. level == stability:: Unstable {
@@ -1880,7 +1885,7 @@ fn short_stability(item: &clean::Item, cx: &Context, show_reason: bool) -> Vec<S
18801885 String :: new ( )
18811886 } ;
18821887 let text = format ! ( "Unstable{}{}" , unstable_extra, Markdown ( & unstable_reason) ) ;
1883- stability. push ( format ! ( "<em class='stab unstable'>{}</em >" , text) )
1888+ stability. push ( format ! ( "<div class='stab unstable'>{}</div >" , text) )
18841889 } ;
18851890 } else if let Some ( depr) = item. deprecation . as_ref ( ) {
18861891 let note = if show_reason && !depr. note . is_empty ( ) {
@@ -1895,7 +1900,7 @@ fn short_stability(item: &clean::Item, cx: &Context, show_reason: bool) -> Vec<S
18951900 } ;
18961901
18971902 let text = format ! ( "Deprecated{}{}" , since, Markdown ( & note) ) ;
1898- stability. push ( format ! ( "<em class='stab deprecated'>{}</em >" , text) )
1903+ stability. push ( format ! ( "<div class='stab deprecated'>{}</div >" , text) )
18991904 }
19001905
19011906 stability
0 commit comments