forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't call
item
on modules for json renderer
Closes rust-lang#80664
- Loading branch information
1 parent
ce21447
commit 9ba9297
Showing
7 changed files
with
64 additions
and
3 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
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.span=='foo::Bar')].id" | ||
// @is - "$.index[*][?(@.inner.span=='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.span=='crate::foo::Bar')].id" | ||
// @is - "$.index[*][?(@.inner.span=='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; |