File tree Expand file tree Collapse file tree 2 files changed +29
-1
lines changed
test/rustdoc-json/reexport Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ impl<'a> ImplStripper<'a> {
161161 } else if self . is_json_output {
162162 // If the "for" item is exported and the impl block isn't `#[doc(hidden)]`, then we
163163 // need to keep it.
164- self . cache . access_levels . is_exported ( for_def_id)
164+ self . cache . effective_visibilities . is_exported ( for_def_id)
165165 && !item. attrs . lists ( sym:: doc) . has_word ( sym:: hidden)
166166 } else {
167167 false
Original file line number Diff line number Diff line change 1+ // Regression test for <https://github.com/rust-lang/rust/issues/102583>.
2+
3+ // @set impl_S = "$.index[*][?(@.docs=='impl S')].id"
4+ // @has "$.index[*][?(@.name=='S')].inner.impls[*]" $impl_S
5+ // @set is_present = "$.index[*][?(@.name=='is_present')].id"
6+ // @is "$.index[*][?(@.docs=='impl S')].inner.items[*]" $is_present
7+ // @!has "$.index[*][?(@.name=='hidden_impl')]"
8+ // @!has "$.index[*][?(@.name=='hidden_fn')]"
9+
10+ #![ no_std]
11+
12+ mod private_mod {
13+ pub struct S ;
14+
15+ /// impl S
16+ impl S {
17+ pub fn is_present ( ) { }
18+ #[ doc( hidden) ]
19+ pub fn hidden_fn ( ) { }
20+ }
21+
22+ #[ doc( hidden) ]
23+ impl S {
24+ pub fn hidden_impl ( ) { }
25+ }
26+ }
27+
28+ pub use private_mod:: * ;
You can’t perform that action at this time.
0 commit comments