Add test of rustdoc sort order for stable vs unstable item

This commit is contained in:
David Tolnay 2023-11-23 17:16:19 -08:00
parent e68f935117
commit a994f46421
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
1 changed files with 11 additions and 0 deletions

View File

@ -2,6 +2,14 @@
#![unstable(feature = "test", issue = "none")]
// @has stability/index.html
// @has - '//ul[@class="item-table"]/li[1]//a' Unstable
// @has - '//ul[@class="item-table"]/li[2]//a' AaStable
// @has - '//ul[@class="item-table"]/li[3]//a' ZzStable
#[stable(feature = "rust2", since = "2.2.2")]
pub struct AaStable;
pub struct Unstable {
// @has stability/struct.Unstable.html \
// '//span[@class="item-info"]//div[@class="stab unstable"]' \
@ -10,3 +18,6 @@ pub struct Unstable {
pub foo: u32,
pub bar: u32,
}
#[stable(feature = "rust2", since = "2.2.2")]
pub struct ZzStable;