@@ -883,14 +883,12 @@ impl<'a, 'tcx> Clean<Generics> for (&'a ty::Generics, ty::GenericPredicates<'tcx
883883 }
884884}
885885
886- impl < ' a > Clean < Method >
887- for ( & ' a hir:: FnSig < ' a > , & ' a hir:: Generics < ' a > , hir:: BodyId , Option < hir:: Defaultness > )
888- {
889- fn clean ( & self , cx : & DocContext < ' _ > ) -> Method {
886+ impl < ' a > Clean < Function > for ( & ' a hir:: FnSig < ' a > , & ' a hir:: Generics < ' a > , hir:: BodyId ) {
887+ fn clean ( & self , cx : & DocContext < ' _ > ) -> Function {
890888 let ( generics, decl) =
891889 enter_impl_trait ( cx, || ( self . 1 . clean ( cx) , ( & * self . 0 . decl , self . 2 ) . clean ( cx) ) ) ;
892890 let ( all_types, ret_types) = get_all_types ( & generics, & decl, cx) ;
893- Method { decl, generics, header : self . 0 . header , defaultness : self . 3 , all_types, ret_types }
891+ Function { decl, generics, header : self . 0 . header , all_types, ret_types }
894892 }
895893}
896894
@@ -1107,13 +1105,13 @@ impl Clean<Item> for hir::TraitItem<'_> {
11071105 AssocConstItem ( ty. clean ( cx) , default. map ( |e| print_const_expr ( cx, e) ) )
11081106 }
11091107 hir:: TraitItemKind :: Fn ( ref sig, hir:: TraitFn :: Provided ( body) ) => {
1110- let mut m = ( sig, & self . generics , body, None ) . clean ( cx) ;
1108+ let mut m = ( sig, & self . generics , body) . clean ( cx) ;
11111109 if m. header . constness == hir:: Constness :: Const
11121110 && is_unstable_const_fn ( cx. tcx , local_did. to_def_id ( ) ) . is_some ( )
11131111 {
11141112 m. header . constness = hir:: Constness :: NotConst ;
11151113 }
1116- MethodItem ( m)
1114+ MethodItem ( m, None )
11171115 }
11181116 hir:: TraitItemKind :: Fn ( ref sig, hir:: TraitFn :: Required ( ref names) ) => {
11191117 let ( generics, decl) = enter_impl_trait ( cx, || {
@@ -1153,13 +1151,13 @@ impl Clean<Item> for hir::ImplItem<'_> {
11531151 AssocConstItem ( ty. clean ( cx) , Some ( print_const_expr ( cx, expr) ) )
11541152 }
11551153 hir:: ImplItemKind :: Fn ( ref sig, body) => {
1156- let mut m = ( sig, & self . generics , body, Some ( self . defaultness ) ) . clean ( cx) ;
1154+ let mut m = ( sig, & self . generics , body) . clean ( cx) ;
11571155 if m. header . constness == hir:: Constness :: Const
11581156 && is_unstable_const_fn ( cx. tcx , local_did. to_def_id ( ) ) . is_some ( )
11591157 {
11601158 m. header . constness = hir:: Constness :: NotConst ;
11611159 }
1162- MethodItem ( m)
1160+ MethodItem ( m, Some ( self . defaultness ) )
11631161 }
11641162 hir:: ImplItemKind :: TyAlias ( ref ty) => {
11651163 let type_ = ty. clean ( cx) ;
@@ -1235,19 +1233,21 @@ impl Clean<Item> for ty::AssocItem {
12351233 ty:: ImplContainer ( _) => Some ( self . defaultness ) ,
12361234 ty:: TraitContainer ( _) => None ,
12371235 } ;
1238- MethodItem ( Method {
1239- generics,
1240- decl,
1241- header : hir:: FnHeader {
1242- unsafety : sig. unsafety ( ) ,
1243- abi : sig. abi ( ) ,
1244- constness,
1245- asyncness,
1236+ MethodItem (
1237+ Function {
1238+ generics,
1239+ decl,
1240+ header : hir:: FnHeader {
1241+ unsafety : sig. unsafety ( ) ,
1242+ abi : sig. abi ( ) ,
1243+ constness,
1244+ asyncness,
1245+ } ,
1246+ all_types,
1247+ ret_types,
12461248 } ,
12471249 defaultness,
1248- all_types,
1249- ret_types,
1250- } )
1250+ )
12511251 } else {
12521252 TyMethodItem ( Function {
12531253 generics,
0 commit comments