]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc-json/impls/import_from_private.rs
Rollup merge of #100514 - compiler-errors:issue-100191, r=spastorino
[rust.git] / src / test / rustdoc-json / impls / import_from_private.rs
1 // https://github.com/rust-lang/rust/issues/100252
2
3 #![feature(no_core)]
4 #![no_core]
5
6 mod bar {
7     // @set baz = import_from_private.json "$.index[*][?(@.kind=='struct')].id"
8     pub struct Baz;
9     // @set impl = - "$.index[*][?(@.kind=='impl')].id"
10     impl Baz {
11         // @set doit = - "$.index[*][?(@.kind=='method')].id"
12         pub fn doit() {}
13     }
14 }
15
16 // @set import = - "$.index[*][?(@.kind=='import')].id"
17 pub use bar::Baz;
18
19 // FIXME(adotinthevoid): Use hasexact once #99474 lands
20
21 // @has - "$.index[*][?(@.kind=='module')].inner.items[*]" $import
22 // @is  - "$.index[*][?(@.kind=='import')].inner.id" $baz
23 // @has - "$.index[*][?(@.kind=='struct')].inner.impls[*]" $impl
24 // @has - "$.index[*][?(@.kind=='impl')].inner.items[*]" $doit