Skip to content

Commit 30b1c35

Browse files
committed
rustdoc: remove blank unstable spans
1 parent da6ab95 commit 30b1c35

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

src/librustdoc/html/render.rs

-4
Original file line numberDiff line numberDiff line change
@@ -3483,10 +3483,6 @@ fn item_struct(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item,
34833483
ns_id = ns_id,
34843484
name = field.name.as_ref().unwrap(),
34853485
ty = ty)?;
3486-
if let Some(stability_class) = field.stability_class() {
3487-
write!(w, "<span class='stab {stab}'></span>",
3488-
stab = stability_class)?;
3489-
}
34903486
document(w, cx, field)?;
34913487
}
34923488
}

src/test/rustdoc/stability.rs

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#![feature(staged_api)]
2+
3+
#![unstable(feature = "test", issue = "0")]
4+
5+
pub struct Unstable {
6+
// @has stability/struct.Unstable.html \
7+
// '//div[@class="stability"]//div[@class="stab unstable"]' \
8+
// 'This is a nightly-only experimental API'
9+
// @count stability/struct.Unstable.html '//span[@class="stab unstable"]' 0
10+
pub foo: u32,
11+
pub bar: u32,
12+
}

0 commit comments

Comments
 (0)