]>
Commit | Line | Data |
---|---|---|
04454e1e FG |
1 | // Regression test for issue #95717 |
2 | // Hide cross-crate `#[doc(hidden)]` associated items in trait impls. | |
3 | ||
4 | #![crate_name = "dependent"] | |
5 | // edition:2021 | |
6 | // aux-crate:dependency=cross-crate-hidden-assoc-trait-items.rs | |
7 | ||
8 | // The trait `Tr` contains 2 hidden and 2 visisible associated items. | |
9 | // Instead of checking for the absence of the hidden items, check for the presence of the | |
10 | // visible items instead and assert that there are *exactly two* associated items | |
11 | // (by counting the number of `section`s). This is more robust and future-proof. | |
12 | ||
13 | // @has dependent/struct.Ty.html | |
14 | // @has - '//*[@id="associatedtype.VisibleAssoc"]' 'type VisibleAssoc = ()' | |
15 | // @has - '//*[@id="associatedconstant.VISIBLE_ASSOC"]' 'const VISIBLE_ASSOC: ()' | |
16 | // @count - '//*[@class="impl-items"]/section' 2 | |
17 | ||
18 | // @has dependent/trait.Tr.html | |
19 | // @has - '//*[@id="associatedtype.VisibleAssoc-1"]' 'type VisibleAssoc = ()' | |
20 | // @has - '//*[@id="associatedconstant.VISIBLE_ASSOC-1"]' 'const VISIBLE_ASSOC: ()' | |
21 | // @count - '//*[@class="impl-items"]/section' 2 | |
22 | ||
23 | pub use dependency::{Tr, Ty}; |