Skip to content

Commit 9be1788

Browse files
Add regression test for unstable items
1 parent ed042d0 commit 9be1788

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

tests/rustdoc-js/unstable.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// exact-check
2+
3+
// This test ensures that unstable items are sorted last.
4+
5+
const EXPECTED = [
6+
{
7+
'query': 'bar',
8+
'others': [
9+
{ 'path': 'unstable', 'name': 'bar2' },
10+
{ 'path': 'unstable', 'name': 'bar1' },
11+
],
12+
},
13+
];

tests/rustdoc-js/unstable.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#![feature(staged_api)]
2+
#![stable(feature = "another", since = "1.0.0")]
3+
4+
#[unstable(feature = "tadam", issue = "none")]
5+
pub fn bar1() {}
6+
7+
#[stable(feature = "another", since = "1.0.0")]
8+
pub fn bar2() {}

0 commit comments

Comments
 (0)