summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id.rs
blob: 141c54a57dd1131374de676dcd0b09884b990bd7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#![feature(no_core)]
#![no_core]

// @count "$.index[*][?(@.inner.impl)]" 1
// @!has "$.index[*][?(@.name == 'HiddenPubStruct')]"
// @has "$.index[*][?(@.name == 'NotHiddenPubStruct')]"
// @has "$.index[*][?(@.name=='PubTrait')]"
pub trait PubTrait {}

#[doc(hidden)]
pub mod hidden {
    pub struct HiddenPubStruct;

    impl crate::PubTrait for HiddenPubStruct {}
}

pub mod not_hidden {
    pub struct NotHiddenPubStruct;

    impl crate::PubTrait for NotHiddenPubStruct {}
}