@@ -7,7 +7,7 @@ use rustc_span::symbol::Symbol;
77use serde:: ser:: { Serialize , SerializeStruct , Serializer } ;
88
99use crate :: clean;
10- use crate :: clean:: types:: { FnDecl , FnRetTy , GenericBound , Generics , Type , WherePredicate } ;
10+ use crate :: clean:: types:: { FnRetTy , Function , GenericBound , Generics , Type , WherePredicate } ;
1111use crate :: formats:: cache:: Cache ;
1212use crate :: formats:: item_type:: ItemType ;
1313use crate :: html:: markdown:: short_markdown_summary;
@@ -186,9 +186,9 @@ crate fn get_index_search_type<'tcx>(
186186 tcx : TyCtxt < ' tcx > ,
187187) -> Option < IndexItemFunctionType > {
188188 let ( mut inputs, mut output) = match * item. kind {
189- clean:: FunctionItem ( ref f) => get_all_types ( & f . generics , & f . decl , tcx) ,
190- clean:: MethodItem ( ref m, _) => get_all_types ( & m . generics , & m . decl , tcx) ,
191- clean:: TyMethodItem ( ref m) => get_all_types ( & m . generics , & m . decl , tcx) ,
189+ clean:: FunctionItem ( ref f) => get_all_types ( f , tcx) ,
190+ clean:: MethodItem ( ref m, _) => get_all_types ( m , tcx) ,
191+ clean:: TyMethodItem ( ref m) => get_all_types ( m , tcx) ,
192192 _ => return None ,
193193 } ;
194194
@@ -378,10 +378,12 @@ fn get_real_types<'tcx>(
378378/// i.e. `fn foo<A: Display, B: Option<A>>(x: u32, y: B)` will return
379379/// `[u32, Display, Option]`.
380380fn get_all_types < ' tcx > (
381- generics : & Generics ,
382- decl : & FnDecl ,
381+ func : & Function ,
383382 tcx : TyCtxt < ' tcx > ,
384383) -> ( Vec < TypeWithKind > , Vec < TypeWithKind > ) {
384+ let decl = & func. decl ;
385+ let generics = & func. generics ;
386+
385387 let mut all_types = Vec :: new ( ) ;
386388 for arg in decl. inputs . values . iter ( ) {
387389 if arg. type_ . is_self_type ( ) {
0 commit comments