diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2019-05-05 12:37:29 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-05-05 12:37:29 -0700 |
| commit | d475c4e8537c1eac6e81f83b32180eef03b83a8c (patch) | |
| tree | 467af4a9257e8c562afbb2a0d46316be144395d5 | |
| parent | a8ed6777eef5f7d7a6a2dba3bbf0093fdd6fa8f9 (diff) | |
| parent | 8fc6e420d16dc882f2047e6ec1b981cac5ef0d14 (diff) | |
| download | rust-d475c4e8537c1eac6e81f83b32180eef03b83a8c.tar.gz rust-d475c4e8537c1eac6e81f83b32180eef03b83a8c.zip | |
Rollup merge of #60515 - euclio:div-in-heading, r=GuillaumeGomez
use span instead of div for since version Fixes #60403. r? @GuillaumeGomez
| -rw-r--r-- | src/librustdoc/html/render.rs | 2 | ||||
| -rw-r--r-- | src/librustdoc/html/static/rustdoc.css | 2 | ||||
| -rw-r--r-- | 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, "<div class='since' title='Stable since Rust version {0}'>{0}</div>", v)? + write!(w, "<span class='since' title='Stable since Rust version {0}'>{0}</span>", 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; } |
