rustdoc: add regression test for #140968
This commit is contained in:
parent
28724dc541
commit
7a6274373c
2 changed files with 16 additions and 0 deletions
10
tests/rustdoc-js/alias-rank-lower-140968.js
Normal file
10
tests/rustdoc-js/alias-rank-lower-140968.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': 'Foo',
|
||||
'others': [
|
||||
{ 'path': 'alias_rank_lower', 'name': 'Foo' },
|
||||
{ 'path': 'alias_rank_lower', 'name': 'Bar' },
|
||||
],
|
||||
};
|
||||
6
tests/rustdoc-js/alias-rank-lower-140968.rs
Normal file
6
tests/rustdoc-js/alias-rank-lower-140968.rs
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#![crate_name = "alias_rank_lower"]
|
||||
|
||||
pub struct Foo;
|
||||
|
||||
#[doc(alias = "Foo")]
|
||||
pub struct Bar;
|
||||
Loading…
Add table
Add a link
Reference in a new issue