-
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.
Add regression test for missing item from private mod in JSON output
- Loading branch information
1 parent
f0234f1
commit 0ef36b8
Showing
2 changed files
with
29 additions
and
1 deletion.
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
28 changes: 28 additions & 0 deletions
28
src/test/rustdoc-json/reexport/reexport_method_from_private_module.rs
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,28 @@ | ||
// Regression test for <https://github.com/rust-lang/rust/issues/102583>. | ||
|
||
// @set impl_S = "$.index[*][?(@.docs=='impl S')].id" | ||
// @has "$.index[*][?(@.name=='S')].inner.impls[*]" $impl_S | ||
// @set is_present = "$.index[*][?(@.name=='is_present')].id" | ||
// @is "$.index[*][?(@.docs=='impl S')].inner.items[*]" $is_present | ||
// @!has "$.index[*][?(@.name=='hidden_impl')]" | ||
// @!has "$.index[*][?(@.name=='hidden_fn')]" | ||
|
||
#![no_std] | ||
|
||
mod private_mod { | ||
pub struct S; | ||
|
||
/// impl S | ||
impl S { | ||
pub fn is_present() {} | ||
#[doc(hidden)] | ||
pub fn hidden_fn() {} | ||
} | ||
|
||
#[doc(hidden)] | ||
impl S { | ||
pub fn hidden_impl() {} | ||
} | ||
} | ||
|
||
pub use private_mod::*; |