diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
commit | 698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch) | |
tree | 173a775858bd501c378080a10dca74132f05bc50 /src/test/rustdoc-json/reexport/glob_private.rs | |
parent | Initial commit. (diff) | |
download | rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip |
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | src/test/rustdoc-json/reexport/glob_private.rs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/test/rustdoc-json/reexport/glob_private.rs b/src/test/rustdoc-json/reexport/glob_private.rs new file mode 100644 index 000000000..e6a44748c --- /dev/null +++ b/src/test/rustdoc-json/reexport/glob_private.rs @@ -0,0 +1,32 @@ +// edition:2018 + +#![no_core] +#![feature(no_core)] + +// @is glob_private.json "$.index[*][?(@.name=='mod1')].kind" \"module\" +// @is glob_private.json "$.index[*][?(@.name=='mod1')].inner.is_stripped" "true" +mod mod1 { + // @is - "$.index[*][?(@.name=='mod2')].kind" \"module\" + // @is - "$.index[*][?(@.name=='mod2')].inner.is_stripped" "true" + mod mod2 { + // @set m2pub_id = - "$.index[*][?(@.name=='Mod2Public')].id" + pub struct Mod2Public; + + // @!has - "$.index[*][?(@.name=='Mod2Private')]" + struct Mod2Private; + } + + // @has - "$.index[*][?(@.kind=='import' && @.inner.name=='mod2')]" + pub use self::mod2::*; + + // @set m1pub_id = - "$.index[*][?(@.name=='Mod1Public')].id" + pub struct Mod1Public; + // @!has - "$.index[*][?(@.name=='Mod1Private')]" + struct Mod1Private; +} + +// @has - "$.index[*][?(@.kind=='import' && @.inner.name=='mod1')]" +pub use mod1::*; + +// @has - "$.index[*][?(@.name=='mod2')].inner.items[*]" $m2pub_id +// @has - "$.index[*][?(@.name=='mod1')].inner.items[*]" $m1pub_id |