Skip to content

Commit

Permalink
Add test of rustdoc sort order for stable vs unstable item
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Nov 24, 2023
1 parent e68f935 commit a994f46
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/rustdoc/stability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"]' \
Expand All @@ -10,3 +18,6 @@ pub struct Unstable {
pub foo: u32,
pub bar: u32,
}

#[stable(feature = "rust2", since = "2.2.2")]
pub struct ZzStable;

0 comments on commit a994f46

Please sign in to comment.