forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#113574 - GuillaumeGomez:rustdoc-json-strip-hi…
…dden-impl, r=aDotInTheVoid,notriddle Strip impl if not re-exported and is doc(hidden) Part of rust-lang#112852. r? `@aDotInTheVoid`
- Loading branch information
Showing
16 changed files
with
107 additions
and
24 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
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
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
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
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
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
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
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
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
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
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
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
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
15 changes: 15 additions & 0 deletions
15
tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id-2.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,15 @@ | ||
#![feature(no_core)] | ||
#![no_core] | ||
|
||
// @count "$.index[*][?(@.inner.impl)]" 1 | ||
// @!has "$.index[*][?(@.name == 'HiddenPubStruct')]" | ||
// @has "$.index[*][?(@.name == 'NotHiddenPubStruct')]" | ||
// @has "$.index[*][?(@.name=='PubTrait')]" | ||
pub trait PubTrait {} | ||
|
||
#[doc(hidden)] | ||
pub struct HiddenPubStruct; | ||
pub struct NotHiddenPubStruct; | ||
|
||
impl PubTrait for HiddenPubStruct {} | ||
impl PubTrait for NotHiddenPubStruct {} |
14 changes: 14 additions & 0 deletions
14
tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id-3.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,14 @@ | ||
// compile-flags: --document-hidden-items | ||
|
||
#![feature(no_core)] | ||
#![no_core] | ||
|
||
// @has "$.index[*][?(@.name == 'HiddenPubStruct')]" | ||
// @has "$.index[*][?(@.inner.impl)]" | ||
// @has "$.index[*][?(@.name=='PubTrait')]" | ||
pub trait PubTrait {} | ||
|
||
#[doc(hidden)] | ||
pub struct HiddenPubStruct; | ||
|
||
impl PubTrait for HiddenPubStruct {} |
21 changes: 21 additions & 0 deletions
21
tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id.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,21 @@ | ||
#![feature(no_core)] | ||
#![no_core] | ||
|
||
// @count "$.index[*][?(@.inner.impl)]" 1 | ||
// @!has "$.index[*][?(@.name == 'HiddenPubStruct')]" | ||
// @has "$.index[*][?(@.name == 'NotHiddenPubStruct')]" | ||
// @has "$.index[*][?(@.name=='PubTrait')]" | ||
pub trait PubTrait {} | ||
|
||
#[doc(hidden)] | ||
pub mod hidden { | ||
pub struct HiddenPubStruct; | ||
|
||
impl crate::PubTrait for HiddenPubStruct {} | ||
} | ||
|
||
pub mod not_hidden { | ||
pub struct NotHiddenPubStruct; | ||
|
||
impl crate::PubTrait for NotHiddenPubStruct {} | ||
} |