-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #83055 - aDotInTheVoid:selective-strip-item-doc, r=jy…
…n514 [rustdoc] Don't document stripped items in JSON renderer. Fixes #80664, see [my comment there](#80664 (comment)) for why Note that we already do something similar in `convert_item`: https://github.com/rust-lang/rust/blob/bb4cdf8ec034dca5c056ec9295f38062e5b7e871/src/librustdoc/json/conversions.rs#L28-L31 ``@rustbot`` modify labels: +T-rustdoc +A-rustdoc-json r? ``@jyn514`` cc ``@CraftSpider``
- Loading branch information
Showing
11 changed files
with
98 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#![feature(no_core)] | ||
#![no_core] | ||
|
||
mod foo { | ||
// @set foo_id = in_root_and_mod.json "$.index[*][?(@.name=='Foo')].id" | ||
pub struct Foo; | ||
} | ||
|
||
// @has - "$.index[*][?(@.name=='in_root_and_mod')].inner.items[*]" $foo_id | ||
pub use foo::Foo; | ||
|
||
pub mod bar { | ||
// @has - "$.index[*][?(@.name=='bar')].inner.items[*]" $foo_id | ||
pub use crate::foo::Foo; | ||
} |
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,20 @@ | ||
#![feature(no_core)] | ||
#![no_core] | ||
|
||
pub mod foo { | ||
// @set bar_id = in_root_and_mod_pub.json "$.index[*][?(@.name=='Bar')].id" | ||
// @has - "$.index[*][?(@.name=='foo')].inner.items[*]" $bar_id | ||
pub struct Bar; | ||
} | ||
|
||
// @set root_import_id = - "$.index[*][?(@.inner.source=='foo::Bar')].id" | ||
// @is - "$.index[*][?(@.inner.source=='foo::Bar')].inner.id" $bar_id | ||
// @has - "$.index[*][?(@.name=='in_root_and_mod_pub')].inner.items[*]" $root_import_id | ||
pub use foo::Bar; | ||
|
||
pub mod baz { | ||
// @set baz_import_id = - "$.index[*][?(@.inner.source=='crate::foo::Bar')].id" | ||
// @is - "$.index[*][?(@.inner.source=='crate::foo::Bar')].inner.id" $bar_id | ||
// @has - "$.index[*][?(@.name=='baz')].inner.items[*]" $baz_import_id | ||
pub use crate::foo::Bar; | ||
} |
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 @@ | ||
// edition:2018 | ||
|
||
#![no_core] | ||
#![feature(no_core)] | ||
// @!has rename_private.json "$.index[*][?(@.name=='inner')]" | ||
mod inner { | ||
// @!has - "$.index[*][?(@.name=='Public')]" | ||
pub struct Public; | ||
} | ||
|
||
// @set newname_id = - "$.index[*][?(@.name=='NewName')].id" | ||
// @is - "$.index[*][?(@.name=='NewName')].kind" \"struct\" | ||
// @has - "$.index[*][?(@.name=='rename_private')].inner.items[*]" $newname_id | ||
pub use inner::Public as NewName; |
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 |
---|---|---|
|
@@ -12,3 +12,4 @@ lazy_static = "1.4" | |
shlex = "0.1" | ||
serde = "1.0" | ||
serde_json = "1.0" | ||
fs-err = "2.5.0" |
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