Skip to content

Commit 28724dc

Browse files
committed
rustdoc: add regression test for rust-lang#146216
1 parent e100792 commit 28724dc

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// exact-check
2+
3+
// consider path distance for doc aliases
4+
// regression test for <https://github.com/rust-lang/rust/issues/146214>
5+
6+
const EXPECTED = {
7+
'query': 'Foo::zzz',
8+
'others': [{ 'path': 'alias_path_distance::Foo', 'name': 'baz' }],
9+
};
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#![crate_name = "alias_path_distance"]
2+
3+
pub struct Foo;
4+
pub struct Bar;
5+
6+
impl Foo {
7+
#[doc(alias = "zzz")]
8+
pub fn baz() {}
9+
}
10+
11+
impl Bar {
12+
#[doc(alias = "zzz")]
13+
pub fn baz() {}
14+
}

0 commit comments

Comments
 (0)