From 7cd891280b64abdd6d03357c2f393aa6e8b70eed Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sun, 12 Jun 2016 01:15:33 +0200 Subject: [PATCH] Fix invalid inlining --- src/librustdoc/html/render.rs | 4 ++-- 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 dc1ef5d94a4..a895a052fb1 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -2258,8 +2258,8 @@ fn item_struct(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item, if fields.peek().is_some() { write!(w, "

Fields

")?; for (field, ty) in fields { - write!(w, "{name}: {ty} - ", + write!(w, "{name}: {ty} + ", 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; }