rustdoc: add regression test for #140968

This commit is contained in:
binarycat 2025-11-25 12:38:36 -06:00
parent 122cbd0438
commit 93526103ea
2 changed files with 15 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': 'foobazbar',
'others': [
{ 'name': 'foobazbar' },
{ 'name': 'foo' },
],
};

View file

@ -0,0 +1,5 @@
/// asdf
pub fn foobazbar() {}
#[doc(alias("foobazbar"))]
pub fn foo() {}