Skip to content

Commit 8fc6e42

Browse files
committed
use span instead of div for since version
1 parent ef9a876 commit 8fc6e42

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

src/librustdoc/html/render.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3410,7 +3410,7 @@ fn render_stability_since_raw<'a, T: fmt::Write>(
34103410
) -> fmt::Result {
34113411
if let Some(v) = ver {
34123412
if containing_ver != ver && v.len() > 0 {
3413-
write!(w, "<div class='since' title='Stable since Rust version {0}'>{0}</div>", v)?
3413+
write!(w, "<span class='since' title='Stable since Rust version {0}'>{0}</span>", v)?
34143414
}
34153415
}
34163416
Ok(())

src/librustdoc/html/static/rustdoc.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -914,7 +914,7 @@ h3 > .collapse-toggle, h4 > .collapse-toggle {
914914
height: 12px;
915915
}
916916

917-
span.since {
917+
.out-of-band > span.since {
918918
position: initial;
919919
font-size: 20px;
920920
margin-right: 5px;
+2-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// ignore-tidy-linelength
2-
31
#![crate_name = "foo"]
42

53
#![feature(staged_api)]
@@ -10,7 +8,8 @@
108
pub struct SomeStruct;
119

1210
impl SomeStruct {
13-
// @has 'foo/struct.SomeStruct.html' '//*[@id="associatedconstant.SOME_CONST"]//div[@class="since"]' '1.1.2'
11+
// @has 'foo/struct.SomeStruct.html' \
12+
// '//*[@id="associatedconstant.SOME_CONST"]//span[@class="since"]' '1.1.2'
1413
#[stable(since="1.1.2", feature="rust2")]
1514
pub const SOME_CONST: usize = 0;
1615
}

0 commit comments

Comments
 (0)