mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-26 13:01:27 +03:00
rustdoc: add regression test for #146216
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
// exact-check
|
||||
|
||||
// consider path distance for doc aliases
|
||||
// regression test for <https://github.com/rust-lang/rust/issues/146214>
|
||||
|
||||
const EXPECTED = {
|
||||
'query': 'Foo::zzz',
|
||||
'others': [{ 'path': 'alias_path_distance::Foo', 'name': 'baz' }],
|
||||
};
|
||||
@@ -0,0 +1,14 @@
|
||||
#![crate_name = "alias_path_distance"]
|
||||
|
||||
pub struct Foo;
|
||||
pub struct Bar;
|
||||
|
||||
impl Foo {
|
||||
#[doc(alias = "zzz")]
|
||||
pub fn baz() {}
|
||||
}
|
||||
|
||||
impl Bar {
|
||||
#[doc(alias = "zzz")]
|
||||
pub fn baz() {}
|
||||
}
|
||||
Reference in New Issue
Block a user