@@ -107,8 +107,7 @@ pub(crate) struct Cache {
107107 // then the fully qualified name of the structure isn't presented in `paths`
108108 // yet when its implementation methods are being indexed. Caches such methods
109109 // 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 > ,
112111
113112 // Similarly to `orphan_impl_items`, sometimes trait impls are picked up
114113 // 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> {
332331 ( Some ( parent) , None ) if is_inherent_impl_item => {
333332 // We have a parent, but we don't know where they're
334333 // defined yet. Wait for later to index this item.
335- self . cache . orphan_impl_items . push ( (
334+ self . cache . orphan_impl_items . push ( OrphanImplItem {
336335 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+ } ) ;
341340 }
342341 _ => { }
343342 }
@@ -554,3 +553,10 @@ impl<'a, 'tcx> DocFolder for CacheBuilder<'a, 'tcx> {
554553 ret
555554 }
556555}
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