Skip to content

Commit a994f46

Browse files
committed
Add test of rustdoc sort order for stable vs unstable item
1 parent e68f935 commit a994f46

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/rustdoc/stability.rs

+11
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
#![unstable(feature = "test", issue = "none")]
44

5+
// @has stability/index.html
6+
// @has - '//ul[@class="item-table"]/li[1]//a' Unstable
7+
// @has - '//ul[@class="item-table"]/li[2]//a' AaStable
8+
// @has - '//ul[@class="item-table"]/li[3]//a' ZzStable
9+
10+
#[stable(feature = "rust2", since = "2.2.2")]
11+
pub struct AaStable;
12+
513
pub struct Unstable {
614
// @has stability/struct.Unstable.html \
715
// '//span[@class="item-info"]//div[@class="stab unstable"]' \
@@ -10,3 +18,6 @@ pub struct Unstable {
1018
pub foo: u32,
1119
pub bar: u32,
1220
}
21+
22+
#[stable(feature = "rust2", since = "2.2.2")]
23+
pub struct ZzStable;

0 commit comments

Comments
 (0)