Skip to content

Commit be8bd82

Browse files
authored
Auto merge of #34234 - GuillaumeGomez:bad_inlining, r=steveklabnik
Fix invalid inlining r? @steveklabnik So to put a context. @nox found an issue on the generated doc: ![screenshot from 2016-06-11 19-53-38](https://cloud.githubusercontent.com/assets/3050060/15987898/f7341de0-303b-11e6-9cd7-f2a6df423ee7.png) So as you can see, the two variants are on the same where they shouldn't. I found out that the issue is also on structs: ![screenshot from 2016-06-11 19-53-31](https://cloud.githubusercontent.com/assets/3050060/15987900/0f66c5de-303c-11e6-90fc-5e49d11b6903.png) And so such is the result of the PR: ![screenshot from 2016-06-12 01-15-21](https://cloud.githubusercontent.com/assets/3050060/15987904/19d9183c-303c-11e6-91c1-7c3f1163fbb0.png) ![screenshot from 2016-06-12 01-15-24](https://cloud.githubusercontent.com/assets/3050060/15987905/1b5d2db0-303c-11e6-8f43-9a8ad2371007.png)
2 parents 2940eb5 + 7cd8912 commit be8bd82

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
@@ -2265,8 +2265,8 @@ fn item_struct(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item,
22652265
if fields.peek().is_some() {
22662266
write!(w, "<h2 class='fields'>Fields</h2>")?;
22672267
for (field, ty) in fields {
2268-
write!(w, "<span id='{shortty}.{name}'><code>{name}: {ty}</code></span>
2269-
<span class='stab {stab}'></span>",
2268+
write!(w, "<span id='{shortty}.{name}' class='{shortty}'><code>{name}: {ty}</code>
2269+
</span><span class='stab {stab}'></span>",
22702270
shortty = ItemType::StructField,
22712271
stab = field.stability_class(),
22722272
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)