diff options
| author | bors <bors@rust-lang.org> | 2016-06-14 07:49:56 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-06-14 07:49:56 -0700 |
| commit | be8bd82268a229be6de90dd241c9d6dc64d48b8c (patch) | |
| tree | eaa80f059ce15bb3ee6713ea73e0183447f19ca9 | |
| parent | 2940eb54bd805dfe45fbf3313688246427eccbc8 (diff) | |
| parent | 7cd891280b64abdd6d03357c2f393aa6e8b70eed (diff) | |
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:  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:  And so such is the result of the PR:  
| -rw-r--r-- | src/librustdoc/html/render.rs | 4 | ||||
| -rw-r--r-- | src/librustdoc/html/static/rustdoc.css | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index 617d2a9b58d..95d48056389 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -2265,8 +2265,8 @@ fn item_struct(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item, if fields.peek().is_some() { write!(w, "<h2 class='fields'>Fields</h2>")?; for (field, ty) in fields { - write!(w, "<span id='{shortty}.{name}'><code>{name}: {ty}</code></span> - <span class='stab {stab}'></span>", + write!(w, "<span id='{shortty}.{name}' class='{shortty}'><code>{name}: {ty}</code> + </span><span class='stab {stab}'></span>", shortty = ItemType::StructField, stab = field.stability_class(), name = field.name.as_ref().unwrap(), diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index da04f26a70b..6d2b315502e 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -659,6 +659,10 @@ span.since { margin-bottom: 25px; } +.variant, .structfield { + display: block; +} + :target > code { background: #FDFFD3; } |
