]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc-json/nested.rs
Rollup merge of #100509 - BoxyUwU:merge_hrtb_with_higher_rank_trait_bound, r=compiler...
[rust.git] / src / test / rustdoc-json / nested.rs
1 // edition:2018
2 // compile-flags: --crate-version 1.0.0
3
4 // @is nested.json "$.crate_version" \"1.0.0\"
5 // @is - "$.index[*][?(@.name=='nested')].kind" \"module\"
6 // @is - "$.index[*][?(@.name=='nested')].inner.is_crate" true
7 // @count - "$.index[*][?(@.name=='nested')].inner.items[*]" 1
8
9 // @is nested.json "$.index[*][?(@.name=='l1')].kind" \"module\"
10 // @is - "$.index[*][?(@.name=='l1')].inner.is_crate" false
11 // @count - "$.index[*][?(@.name=='l1')].inner.items[*]" 2
12 pub mod l1 {
13
14     // @is nested.json "$.index[*][?(@.name=='l3')].kind" \"module\"
15     // @is - "$.index[*][?(@.name=='l3')].inner.is_crate" false
16     // @count - "$.index[*][?(@.name=='l3')].inner.items[*]" 1
17     // @set l3_id = - "$.index[*][?(@.name=='l3')].id"
18     // @has - "$.index[*][?(@.name=='l1')].inner.items[*]" $l3_id
19     pub mod l3 {
20
21         // @is nested.json "$.index[*][?(@.name=='L4')].kind" \"struct\"
22         // @is - "$.index[*][?(@.name=='L4')].inner.struct_type" \"unit\"
23         // @set l4_id = - "$.index[*][?(@.name=='L4')].id"
24         // @has - "$.index[*][?(@.name=='l3')].inner.items[*]" $l4_id
25         pub struct L4;
26     }
27     // @is nested.json "$.index[*][?(@.inner.source=='l3::L4')].kind" \"import\"
28     // @is - "$.index[*][?(@.inner.source=='l3::L4')].inner.glob" false
29     pub use l3::L4;
30 }