Skip to content

Commit 3044e5d

Browse files
Add regression test for #130233
1 parent 1d34c32 commit 3044e5d

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// This test ensures that private/hidden items don't create ambiguity.
2+
// This is a regression test for <https://github.com/rust-lang/rust/issues/130233>.
3+
4+
#![deny(rustdoc::broken_intra_doc_links)]
5+
#![crate_name = "foo"]
6+
7+
pub struct Thing {}
8+
9+
#[doc(hidden)]
10+
#[allow(non_snake_case)]
11+
pub fn Thing() {}
12+
13+
pub struct Bar {}
14+
15+
#[allow(non_snake_case)]
16+
fn Bar() {}
17+
18+
//@ has 'foo/fn.repro.html'
19+
//@ has - '//*[@class="toggle top-doc"]/*[@class="docblock"]//a/@href' 'struct.Thing.html'
20+
/// Do stuff with [`Thing`].
21+
pub fn repro(_: Thing) {}
22+
23+
//@ has 'foo/fn.repro2.html'
24+
//@ has - '//*[@class="toggle top-doc"]/*[@class="docblock"]//a/@href' 'struct.Bar.html'
25+
/// Do stuff with [`Bar`].
26+
pub fn repro2(_: Bar) {}

0 commit comments

Comments
 (0)