summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc-json/impls/import_from_private.rs
blob: 3da03df2546ca843b02e63a4c60faa7b03630c5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// https://github.com/rust-lang/rust/issues/100252

mod bar {
    // @set baz = "$.index[*][?(@.name == 'Baz')].id"
    pub struct Baz;
    // @set impl = "$.index[*][?(@.docs == 'impl')].id"
    /// impl
    impl Baz {
        // @set doit = "$.index[*][?(@.name == 'doit')].id"
        pub fn doit() {}
    }
}

// @set import = "$.index[*][?(@.inner.import)].id"
pub use bar::Baz;

// @is "$.index[*].inner.module.items[*]" $import
// @is "$.index[*].inner.import.id" $baz
// @has "$.index[*][?(@.name == 'Baz')].inner.struct.impls[*]" $impl
// @is "$.index[*][?(@.docs=='impl')].inner.impl.items[*]" $doit