Skip to content

Commit 7245903

Browse files
Add test to enforce sidebar trait items order
1 parent 5e81325 commit 7245903

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

src/test/rustdoc-gui/lib.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,19 @@ pub fn some_more_function<T: fmt::Debug>(t: &T) -> String {
4747

4848
/// Woohoo! A trait!
4949
pub trait AnotherOne {
50+
/// Some func 3.
51+
fn func3();
52+
5053
/// Some func 1.
5154
fn func1();
5255

56+
fn another();
57+
fn why_not();
58+
5359
/// Some func 2.
5460
fn func2();
5561

56-
/// Some func 3.
57-
fn func3();
62+
fn hello();
5863
}
5964

6065
/// Check for "i" signs in lists!
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
goto: file://|DOC_PATH|/trait.AnotherOne.html
2+
assert: (".sidebar-links a:nth-of-type(1)", "another")
3+
assert: (".sidebar-links a:nth-of-type(2)", "func1")
4+
assert: (".sidebar-links a:nth-of-type(3)", "func2")
5+
assert: (".sidebar-links a:nth-of-type(4)", "func3")
6+
assert: (".sidebar-links a:nth-of-type(5)", "hello")
7+
assert: (".sidebar-links a:nth-of-type(6)", "why_not")

0 commit comments

Comments
 (0)