Skip to content

Commit 4b106a7

Browse files
authored
Unrolled build for #149325
Rollup merge of #149325 - lolbinarycat:rustdoc-alias-sort-140968, r=GuillaumeGomez rustdoc: add regression test for #140968 fixes #140968
2 parents 1be6b13 + 9352610 commit 4b106a7

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

tests/rustdoc-js/alias-sort.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// rank doc aliases lower than exact matches
2+
// regression test for <https://github.com/rust-lang/rust/issues/140968>
3+
4+
const EXPECTED = {
5+
'query': 'foobazbar',
6+
'others': [
7+
{ 'name': 'foobazbar' },
8+
{ 'name': 'foo' },
9+
],
10+
};

tests/rustdoc-js/alias-sort.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/// asdf
2+
pub fn foobazbar() {}
3+
4+
#[doc(alias("foobazbar"))]
5+
pub fn foo() {}

0 commit comments

Comments
 (0)