2020-12-05 22:23:17 +00:00
|
|
|
// edition:2018
|
2021-02-25 00:16:47 -05:00
|
|
|
// compile-flags: --crate-version 1.0.0
|
2021-01-15 20:34:15 -05:00
|
|
|
|
2021-02-25 00:16:47 -05:00
|
|
|
// @is nested.json "$.crate_version" \"1.0.0\"
|
|
|
|
|
// @is - "$.index[*][?(@.name=='nested')].kind" \"module\"
|
2021-02-20 00:43:02 +00:00
|
|
|
// @is - "$.index[*][?(@.name=='nested')].inner.is_crate" true
|
2022-07-19 16:57:38 +01:00
|
|
|
|
|
|
|
|
// @set l1_id = - "$.index[*][?(@.name=='l1')].id"
|
|
|
|
|
// @ismany - "$.index[*][?(@.name=='nested')].inner.items[*]" $l1_id
|
2021-01-15 20:34:15 -05:00
|
|
|
|
2021-02-20 00:43:02 +00:00
|
|
|
// @is nested.json "$.index[*][?(@.name=='l1')].kind" \"module\"
|
|
|
|
|
// @is - "$.index[*][?(@.name=='l1')].inner.is_crate" false
|
2020-12-05 22:23:17 +00:00
|
|
|
pub mod l1 {
|
2021-02-20 00:43:02 +00:00
|
|
|
// @is nested.json "$.index[*][?(@.name=='l3')].kind" \"module\"
|
|
|
|
|
// @is - "$.index[*][?(@.name=='l3')].inner.is_crate" false
|
2021-02-20 01:25:09 +00:00
|
|
|
// @set l3_id = - "$.index[*][?(@.name=='l3')].id"
|
2020-12-05 22:23:17 +00:00
|
|
|
pub mod l3 {
|
2021-01-15 20:34:15 -05:00
|
|
|
|
2021-02-20 00:43:02 +00:00
|
|
|
// @is nested.json "$.index[*][?(@.name=='L4')].kind" \"struct\"
|
|
|
|
|
// @is - "$.index[*][?(@.name=='L4')].inner.struct_type" \"unit\"
|
2021-02-20 01:25:09 +00:00
|
|
|
// @set l4_id = - "$.index[*][?(@.name=='L4')].id"
|
2022-07-19 16:57:38 +01:00
|
|
|
// @ismany - "$.index[*][?(@.name=='l3')].inner.items[*]" $l4_id
|
2020-12-05 22:23:17 +00:00
|
|
|
pub struct L4;
|
|
|
|
|
}
|
2021-03-09 21:51:32 -08:00
|
|
|
// @is nested.json "$.index[*][?(@.inner.source=='l3::L4')].kind" \"import\"
|
|
|
|
|
// @is - "$.index[*][?(@.inner.source=='l3::L4')].inner.glob" false
|
2022-07-19 16:57:38 +01:00
|
|
|
// @is - "$.index[*][?(@.inner.source=='l3::L4')].inner.id" $l4_id
|
|
|
|
|
// @set l4_use_id = - "$.index[*][?(@.inner.source=='l3::L4')].id"
|
2020-12-05 22:23:17 +00:00
|
|
|
pub use l3::L4;
|
|
|
|
|
}
|
2022-07-19 16:57:38 +01:00
|
|
|
// @ismany - "$.index[*][?(@.name=='l1')].inner.items[*]" $l3_id $l4_use_id
|