granite-rust/src/test/rustdoc-json/nested.rs

29 lines
1.2 KiB
Rust
Raw Normal View History

2020-12-05 22:23:17 +00:00
// edition:2018
2021-02-20 00:43:02 +00:00
// @is nested.json "$.index[*][?(@.name=='nested')].kind" \"module\"
// @is - "$.index[*][?(@.name=='nested')].inner.is_crate" true
2021-01-19 14:21:05 -05:00
// @count - "$.index[*][?(@.name=='nested')].inner.items[*]" 1
2021-02-20 00:43:02 +00:00
// @is nested.json "$.index[*][?(@.name=='l1')].kind" \"module\"
// @is - "$.index[*][?(@.name=='l1')].inner.is_crate" false
2021-01-19 14:21:05 -05:00
// @count - "$.index[*][?(@.name=='l1')].inner.items[*]" 2
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-01-19 14:21:05 -05:00
// @count - "$.index[*][?(@.name=='l3')].inner.items[*]" 1
2021-02-20 01:25:09 +00:00
// @set l3_id = - "$.index[*][?(@.name=='l3')].id"
2021-02-20 01:47:17 +00:00
// @has - "$.index[*][?(@.name=='l1')].inner.items[*]" $l3_id
2020-12-05 22:23:17 +00:00
pub mod l3 {
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"
2021-02-20 01:47:17 +00:00
// @has - "$.index[*][?(@.name=='l3')].inner.items[*]" $l4_id
2020-12-05 22:23:17 +00:00
pub struct L4;
}
2021-02-20 00:43:02 +00:00
// @is nested.json "$.index[*][?(@.inner.span=='l3::L4')].kind" \"import\"
// @is - "$.index[*][?(@.inner.span=='l3::L4')].inner.glob" false
2020-12-05 22:23:17 +00:00
pub use l3::L4;
}