Skip to content

Commit c132cdb

Browse files
Improve issue-112852 tests
1 parent 2861a56 commit c132cdb

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
#![feature(no_core)]
22
#![no_core]
33

4+
// @count "$.index[*][?(@.inner.impl)]" 1
45
// @!has "$.index[*][?(@.name == 'HiddenPubStruct')]"
5-
// @!has "$.index[*][?(@.inner.impl)]"
6+
// @has "$.index[*][?(@.name == 'NotHiddenPubStruct')]"
67
// @has "$.index[*][?(@.name=='PubTrait')]"
78
pub trait PubTrait {}
89

910
#[doc(hidden)]
1011
pub struct HiddenPubStruct;
12+
pub struct NotHiddenPubStruct;
1113

1214
impl PubTrait for HiddenPubStruct {}
15+
impl PubTrait for NotHiddenPubStruct {}

tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
#![feature(no_core)]
22
#![no_core]
33

4+
// @count "$.index[*][?(@.inner.impl)]" 1
45
// @!has "$.index[*][?(@.name == 'HiddenPubStruct')]"
5-
// @!has "$.index[*][?(@.inner.impl)]"
6+
// @has "$.index[*][?(@.name == 'NotHiddenPubStruct')]"
67
// @has "$.index[*][?(@.name=='PubTrait')]"
78
pub trait PubTrait {}
89

@@ -12,3 +13,9 @@ pub mod hidden {
1213

1314
impl crate::PubTrait for HiddenPubStruct {}
1415
}
16+
17+
pub mod not_hidden {
18+
pub struct NotHiddenPubStruct;
19+
20+
impl crate::PubTrait for NotHiddenPubStruct {}
21+
}

0 commit comments

Comments
 (0)