rustdoc: remove blank unstable spans

This commit is contained in:
Andy Russell 2019-01-28 13:04:05 -05:00
parent da6ab956e1
commit 30b1c35f03
No known key found for this signature in database
GPG Key ID: BE2221033EDBC374
2 changed files with 12 additions and 4 deletions

View File

@ -3483,10 +3483,6 @@ fn item_struct(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item,
ns_id = ns_id,
name = field.name.as_ref().unwrap(),
ty = ty)?;
if let Some(stability_class) = field.stability_class() {
write!(w, "<span class='stab {stab}'></span>",
stab = stability_class)?;
}
document(w, cx, field)?;
}
}

View File

@ -0,0 +1,12 @@
#![feature(staged_api)]
#![unstable(feature = "test", issue = "0")]
pub struct Unstable {
// @has stability/struct.Unstable.html \
// '//div[@class="stability"]//div[@class="stab unstable"]' \
// 'This is a nightly-only experimental API'
// @count stability/struct.Unstable.html '//span[@class="stab unstable"]' 0
pub foo: u32,
pub bar: u32,
}