rustdoc: add missing margin to no-docblock trait items

Fixes another regression caused by 8846c0853d,
this time fixing the appearance of methods that have no docblock (we didn't
notice this one because libstd docs *always* have docblocks).

See how it looks at https://doc.rust-lang.org/nightly/nightly-rustc/rustdoc/clean/types/trait.AttributesExt.html
This commit is contained in:
Michael Howell 2022-09-30 10:15:59 -07:00
parent 8728e17855
commit f145f283f7
2 changed files with 4 additions and 3 deletions

View file

@ -718,7 +718,7 @@ fn item_trait(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &clean:
if toggled {
write!(w, "<details class=\"rustdoc-toggle method-toggle\" open><summary>");
}
write!(w, "<div id=\"{}\" class=\"method has-srclink\">", id);
write!(w, "<section id=\"{}\" class=\"method has-srclink\">", id);
render_rightside(w, cx, m, t, RenderMode::Normal);
write!(w, "<h4 class=\"code-header\">");
render_assoc_item(
@ -730,7 +730,7 @@ fn item_trait(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &clean:
RenderMode::Normal,
);
w.write_str("</h4>");
w.write_str("</div>");
w.write_str("</section>");
if toggled {
write!(w, "</summary>");
w.push_buffer(content);

View file

@ -2010,7 +2010,8 @@ in storage.js plus the media query with (min-width: 701px)
.impl,
#implementors-list > .docblock,
.impl-items > section,
{
.methods > section
{
margin-bottom: 0.75em;
}