@@ -107,8 +107,7 @@ pub(crate) struct Cache {
107
107
// then the fully qualified name of the structure isn't presented in `paths`
108
108
// yet when its implementation methods are being indexed. Caches such methods
109
109
// and their parent id here and indexes them at the end of crate parsing.
110
- pub ( crate ) orphan_impl_items :
111
- Vec < ( DefId , clean:: Item , Option < ( clean:: Type , clean:: Generics ) > , bool ) > ,
110
+ pub ( crate ) orphan_impl_items : Vec < OrphanImplItem > ,
112
111
113
112
// Similarly to `orphan_impl_items`, sometimes trait impls are picked up
114
113
// even though the trait itself is not exported. This can happen if a trait
@@ -332,12 +331,12 @@ impl<'a, 'tcx> DocFolder for CacheBuilder<'a, 'tcx> {
332
331
( Some ( parent) , None ) if is_inherent_impl_item => {
333
332
// We have a parent, but we don't know where they're
334
333
// defined yet. Wait for later to index this item.
335
- self . cache . orphan_impl_items . push ( (
334
+ self . cache . orphan_impl_items . push ( OrphanImplItem {
336
335
parent,
337
- item. clone ( ) ,
338
- self . cache . impl_generics_stack . last ( ) . cloned ( ) ,
339
- self . cache . parent_is_blanket_or_auto_impl ,
340
- ) ) ;
336
+ item : item . clone ( ) ,
337
+ impl_generics : self . cache . impl_generics_stack . last ( ) . cloned ( ) ,
338
+ parent_is_blanket_or_auto_impl : self . cache . parent_is_blanket_or_auto_impl ,
339
+ } ) ;
341
340
}
342
341
_ => { }
343
342
}
@@ -554,3 +553,10 @@ impl<'a, 'tcx> DocFolder for CacheBuilder<'a, 'tcx> {
554
553
ret
555
554
}
556
555
}
556
+
557
+ pub ( crate ) struct OrphanImplItem {
558
+ pub ( crate ) parent : DefId ,
559
+ pub ( crate ) item : clean:: Item ,
560
+ pub ( crate ) impl_generics : Option < ( clean:: Type , clean:: Generics ) > ,
561
+ pub ( crate ) parent_is_blanket_or_auto_impl : bool ,
562
+ }
0 commit comments