Skip to content

Commit 7cd8912

Browse files
Fix invalid inlining
1 parent 7d8e6dd commit 7cd8912

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/librustdoc/html/render.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2258,8 +2258,8 @@ fn item_struct(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item,
22582258
if fields.peek().is_some() {
22592259
write!(w, "<h2 class='fields'>Fields</h2>")?;
22602260
for (field, ty) in fields {
2261-
write!(w, "<span id='{shortty}.{name}'><code>{name}: {ty}</code></span>
2262-
<span class='stab {stab}'></span>",
2261+
write!(w, "<span id='{shortty}.{name}' class='{shortty}'><code>{name}: {ty}</code>
2262+
</span><span class='stab {stab}'></span>",
22632263
shortty = ItemType::StructField,
22642264
stab = field.stability_class(),
22652265
name = field.name.as_ref().unwrap(),

src/librustdoc/html/static/rustdoc.css

+4
Original file line numberDiff line numberDiff line change
@@ -659,6 +659,10 @@ span.since {
659659
margin-bottom: 25px;
660660
}
661661

662+
.variant, .structfield {
663+
display: block;
664+
}
665+
662666
:target > code {
663667
background: #FDFFD3;
664668
}

0 commit comments

Comments
 (0)