File tree Expand file tree Collapse file tree 2 files changed +10
-11
lines changed Expand file tree Collapse file tree 2 files changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -75,14 +75,6 @@ impl ItemId {
75
75
}
76
76
}
77
77
78
- #[ inline]
79
- crate fn is_local_impl ( self ) -> bool {
80
- match self {
81
- ItemId :: Blanket { impl_id, .. } => impl_id. is_local ( ) ,
82
- ItemId :: Auto { .. } | ItemId :: DefId ( _) | ItemId :: Primitive ( _, _) => false ,
83
- }
84
- }
85
-
86
78
#[ inline]
87
79
#[ track_caller]
88
80
crate fn expect_def_id ( self ) -> DefId {
Original file line number Diff line number Diff line change @@ -171,10 +171,17 @@ impl<'tcx> FormatRenderer<'tcx> for JsonRenderer<'tcx> {
171
171
/// the hashmap because certain items (traits and types) need to have their mappings for trait
172
172
/// implementations filled out before they're inserted.
173
173
fn item ( & mut self , item : clean:: Item ) -> Result < ( ) , Error > {
174
+ // We skip children of local blanket implementations, as we'll have already seen the actual
175
+ // generic impl, and the generated ones don't need documenting.
176
+ let local_blanket_impl = match item. def_id {
177
+ clean:: ItemId :: Blanket { impl_id, .. } => impl_id. is_local ( ) ,
178
+ clean:: ItemId :: Auto { .. }
179
+ | clean:: ItemId :: DefId ( _)
180
+ | clean:: ItemId :: Primitive ( _, _) => false ,
181
+ } ;
182
+
174
183
// Flatten items that recursively store other items
175
- // We skip local blanket implementations, as we'll have already seen the actual generic
176
- // impl, and the generated ones don't need documenting.
177
- if !item. def_id . is_local_impl ( ) {
184
+ if !local_blanket_impl {
178
185
item. kind . inner_items ( ) . for_each ( |i| self . item ( i. clone ( ) ) . unwrap ( ) ) ;
179
186
}
180
187
You can’t perform that action at this time.
0 commit comments