From 8fc6e420d16dc882f2047e6ec1b981cac5ef0d14 Mon Sep 17 00:00:00 2001 From: Andy Russell Date: Fri, 3 May 2019 12:55:31 -0400 Subject: [PATCH] use span instead of div for since version --- src/librustdoc/html/render.rs | 2 +- src/librustdoc/html/static/rustdoc.css | 2 +- src/test/rustdoc/assoc-consts-version.rs | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index f4af362a557..472192a6464 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -3410,7 +3410,7 @@ fn render_stability_since_raw<'a, T: fmt::Write>( ) -> fmt::Result { if let Some(v) = ver { if containing_ver != ver && v.len() > 0 { - write!(w, "
{0}
", v)? + write!(w, "{0}", v)? } } Ok(()) diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index 358549117a3..4204d20498d 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -914,7 +914,7 @@ h3 > .collapse-toggle, h4 > .collapse-toggle { height: 12px; } -span.since { +.out-of-band > span.since { position: initial; font-size: 20px; margin-right: 5px; diff --git a/src/test/rustdoc/assoc-consts-version.rs b/src/test/rustdoc/assoc-consts-version.rs index c561269cf9a..6060bc0a6fd 100644 --- a/src/test/rustdoc/assoc-consts-version.rs +++ b/src/test/rustdoc/assoc-consts-version.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - #![crate_name = "foo"] #![feature(staged_api)] @@ -10,7 +8,8 @@ pub struct SomeStruct; impl SomeStruct { - // @has 'foo/struct.SomeStruct.html' '//*[@id="associatedconstant.SOME_CONST"]//div[@class="since"]' '1.1.2' + // @has 'foo/struct.SomeStruct.html' \ + // '//*[@id="associatedconstant.SOME_CONST"]//span[@class="since"]' '1.1.2' #[stable(since="1.1.2", feature="rust2")] pub const SOME_CONST: usize = 0; }