rustdoc: add regression test for #140968

This commit is contained in:
binarycat 2025-10-14 14:36:48 -05:00
parent 28724dc541
commit 7a6274373c
2 changed files with 16 additions and 0 deletions

View 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' },
],
};

View file

@ -0,0 +1,6 @@
#![crate_name = "alias_rank_lower"]
pub struct Foo;
#[doc(alias = "Foo")]
pub struct Bar;