@@ -824,9 +824,9 @@ impl Serialize for Implementor {
824
824
/// this visitor works to reverse that: `aliased_types` is a map
825
825
/// from target to the aliases that reference it, and each one
826
826
/// will generate one file.
827
- struct TypeImplCollector < ' cx , ' cache > {
827
+ struct TypeImplCollector < ' cx , ' cache , ' item > {
828
828
/// Map from DefId-of-aliased-type to its data.
829
- aliased_types : IndexMap < DefId , AliasedType < ' cache > > ,
829
+ aliased_types : IndexMap < DefId , AliasedType < ' cache , ' item > > ,
830
830
visited_aliases : FxHashSet < DefId > ,
831
831
cache : & ' cache Cache ,
832
832
cx : & ' cache mut Context < ' cx > ,
@@ -847,26 +847,26 @@ struct TypeImplCollector<'cx, 'cache> {
847
847
/// ]
848
848
/// )
849
849
/// ```
850
- struct AliasedType < ' cache > {
850
+ struct AliasedType < ' cache , ' item > {
851
851
/// This is used to generate the actual filename of this aliased type.
852
852
target_fqp : & ' cache [ Symbol ] ,
853
853
target_type : ItemType ,
854
854
/// This is the data stored inside the file.
855
855
/// ItemId is used to deduplicate impls.
856
- impl_ : IndexMap < ItemId , AliasedTypeImpl < ' cache > > ,
856
+ impl_ : IndexMap < ItemId , AliasedTypeImpl < ' cache , ' item > > ,
857
857
}
858
858
859
859
/// The `impl_` contains data that's used to figure out if an alias will work,
860
860
/// and to generate the HTML at the end.
861
861
///
862
862
/// The `type_aliases` list is built up with each type alias that matches.
863
- struct AliasedTypeImpl < ' cache > {
863
+ struct AliasedTypeImpl < ' cache , ' item > {
864
864
impl_ : & ' cache Impl ,
865
- type_aliases : Vec < ( & ' cache [ Symbol ] , Item ) > ,
865
+ type_aliases : Vec < ( & ' cache [ Symbol ] , & ' item Item ) > ,
866
866
}
867
867
868
- impl < ' cx , ' cache > DocVisitor < ' _ > for TypeImplCollector < ' cx , ' cache > {
869
- fn visit_item ( & mut self , it : & Item ) {
868
+ impl < ' cx , ' cache , ' item > DocVisitor < ' item > for TypeImplCollector < ' cx , ' cache , ' item > {
869
+ fn visit_item ( & mut self , it : & ' item Item ) {
870
870
self . visit_item_recur ( it) ;
871
871
let cache = self . cache ;
872
872
let ItemKind :: TypeAliasItem ( ref t) = it. kind else { return } ;
@@ -927,7 +927,7 @@ impl<'cx, 'cache> DocVisitor<'_> for TypeImplCollector<'cx, 'cache> {
927
927
continue ;
928
928
}
929
929
// This impl was not found in the set of rejected impls
930
- aliased_type_impl. type_aliases . push ( ( & self_fqp[ ..] , it. clone ( ) ) ) ;
930
+ aliased_type_impl. type_aliases . push ( ( & self_fqp[ ..] , it) ) ;
931
931
}
932
932
}
933
933
}
0 commit comments