rustdoc: add regression test for #140968
This commit is contained in:
parent
122cbd0438
commit
93526103ea
2 changed files with 15 additions and 0 deletions
10
tests/rustdoc-js/alias-sort.js
Normal file
10
tests/rustdoc-js/alias-sort.js
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
// rank doc aliases lower than exact matches
|
||||
// regression test for <https://github.com/rust-lang/rust/issues/140968>
|
||||
|
||||
const EXPECTED = {
|
||||
'query': 'foobazbar',
|
||||
'others': [
|
||||
{ 'name': 'foobazbar' },
|
||||
{ 'name': 'foo' },
|
||||
],
|
||||
};
|
||||
5
tests/rustdoc-js/alias-sort.rs
Normal file
5
tests/rustdoc-js/alias-sort.rs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
/// asdf
|
||||
pub fn foobazbar() {}
|
||||
|
||||
#[doc(alias("foobazbar"))]
|
||||
pub fn foo() {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue