Skip to content

Commit 8d6e349

Browse files
authored
Rollup merge of #149325 - lolbinarycat:rustdoc-alias-sort-140968, r=GuillaumeGomez
rustdoc: add regression test for #140968 fixes #140968
2 parents a545fa3 + 9352610 commit 8d6e349

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)