-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6c20cd3
commit c1ec733
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// This test ensures that private/hidden items don't create ambiguity. | ||
// This is a regression test for </~https://github.com/rust-lang/rust/issues/130233>. | ||
|
||
#![deny(rustdoc::broken_intra_doc_links)] | ||
#![crate_name = "foo"] | ||
|
||
pub struct Thing {} | ||
|
||
#[doc(hidden)] | ||
#[allow(non_snake_case)] | ||
pub fn Thing() {} | ||
|
||
pub struct Bar {} | ||
|
||
#[allow(non_snake_case)] | ||
fn Bar() {} | ||
|
||
//@ has 'foo/fn.repro.html' | ||
//@ has - '//*[@class="toggle top-doc"]/*[@class="docblock"]//a/@href' 'struct.Thing.html' | ||
/// Do stuff with [`Thing`]. | ||
pub fn repro(_: Thing) {} | ||
|
||
//@ has 'foo/fn.repro2.html' | ||
//@ has - '//*[@class="toggle top-doc"]/*[@class="docblock"]//a/@href' 'struct.Bar.html' | ||
/// Do stuff with [`Bar`]. | ||
pub fn repro2(_: Bar) {} |