rust/tests/rustdoc-json/reexport/glob_private.rs

34 lines
1.1 KiB
Rust
Raw Normal View History

2021-02-26 16:55:08 -06:00
// edition:2018
#![no_core]
#![feature(no_core)]
2022-08-17 05:55:09 -05:00
// @is "$.index[*][?(@.name=='mod1')].kind" \"module\"
// @is "$.index[*][?(@.name=='mod1')].inner.is_stripped" "true"
2021-02-26 16:55:08 -06:00
mod mod1 {
2022-08-17 05:55:09 -05:00
// @is "$.index[*][?(@.name=='mod2')].kind" \"module\"
// @is "$.index[*][?(@.name=='mod2')].inner.is_stripped" "true"
2021-02-26 16:55:08 -06:00
mod mod2 {
2022-08-17 05:55:09 -05:00
// @set m2pub_id = "$.index[*][?(@.name=='Mod2Public')].id"
2021-02-26 16:55:08 -06:00
pub struct Mod2Public;
2022-08-17 05:55:09 -05:00
// @!has "$.index[*][?(@.name=='Mod2Private')]"
2021-02-26 16:55:08 -06:00
struct Mod2Private;
}
2022-07-15 10:48:46 -05:00
2022-08-17 05:55:09 -05:00
// @set mod2_use_id = "$.index[*][?(@.kind=='import' && @.inner.name=='mod2')].id"
2021-02-26 16:55:08 -06:00
pub use self::mod2::*;
2022-08-17 05:55:09 -05:00
// @set m1pub_id = "$.index[*][?(@.name=='Mod1Public')].id"
2021-02-26 16:55:08 -06:00
pub struct Mod1Public;
2022-08-17 05:55:09 -05:00
// @!has "$.index[*][?(@.name=='Mod1Private')]"
2021-02-26 16:55:08 -06:00
struct Mod1Private;
}
2022-07-15 10:48:46 -05:00
2022-08-17 05:55:09 -05:00
// @set mod1_use_id = "$.index[*][?(@.kind=='import' && @.inner.name=='mod1')].id"
2021-02-26 16:55:08 -06:00
pub use mod1::*;
2022-08-17 05:55:09 -05:00
// @ismany "$.index[*][?(@.name=='mod2')].inner.items[*]" $m2pub_id
// @ismany "$.index[*][?(@.name=='mod1')].inner.items[*]" $m1pub_id $mod2_use_id
// @ismany "$.index[*][?(@.name=='glob_private')].inner.items[*]" $mod1_use_id