diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index db1bb28c890..9b1d256304d 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -2087,15 +2087,19 @@ fn item_trait(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item, if !consts.is_empty() && !required.is_empty() { w.write_str("\n")?; } - for m in &required { + for (pos, m) in required.iter().enumerate() { write!(w, " ")?; render_assoc_item(w, m, AssocItemLink::Anchor(None), ItemType::Trait)?; write!(w, ";\n")?; + + if pos < required.len() - 1 { + write!(w, "
")?; + } } if !required.is_empty() && !provided.is_empty() { w.write_str("\n")?; } - for m in &provided { + for (pos, m) in provided.iter().enumerate() { write!(w, " ")?; render_assoc_item(w, m, AssocItemLink::Anchor(None), ItemType::Trait)?; match m.inner { @@ -2106,6 +2110,9 @@ fn item_trait(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item, write!(w, " {{ ... }}\n")?; }, } + if pos < provided.len() - 1 { + write!(w, "
")?; + } } write!(w, "}}")?; } diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index 969cc4eeda2..567c8fb9718 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -658,6 +658,11 @@ h3 > .collapse-toggle, h4 > .collapse-toggle { padding-left: 10px; } +.item-spacer { + width: 100%; + height: 12px; +} + span.since { position: initial; font-size: 20px;