@@ -1296,20 +1296,43 @@ impl<'tcx> Clean<Item> for ty::Method<'tcx> {
1296
1296
}
1297
1297
} ;
1298
1298
1299
+ let generics = ( & self . generics , & self . predicates ,
1300
+ subst:: FnSpace ) . clean ( cx) ;
1301
+ let decl = ( self . def_id , & sig) . clean ( cx) ;
1302
+ let provided = match self . container {
1303
+ ty:: ImplContainer ( ..) => false ,
1304
+ ty:: TraitContainer ( did) => {
1305
+ ty:: provided_trait_methods ( cx. tcx ( ) , did) . iter ( ) . any ( |m| {
1306
+ m. def_id == self . def_id
1307
+ } )
1308
+ }
1309
+ } ;
1310
+ let inner = if provided {
1311
+ MethodItem ( Method {
1312
+ unsafety : self . fty . unsafety ,
1313
+ generics : generics,
1314
+ self_ : self_,
1315
+ decl : decl,
1316
+ abi : self . fty . abi
1317
+ } )
1318
+ } else {
1319
+ TyMethodItem ( TyMethod {
1320
+ unsafety : self . fty . unsafety ,
1321
+ generics : generics,
1322
+ self_ : self_,
1323
+ decl : decl,
1324
+ abi : self . fty . abi
1325
+ } )
1326
+ } ;
1327
+
1299
1328
Item {
1300
1329
name : Some ( self . name . clean ( cx) ) ,
1301
1330
visibility : Some ( ast:: Inherited ) ,
1302
1331
stability : get_stability ( cx, self . def_id ) ,
1303
1332
def_id : self . def_id ,
1304
1333
attrs : inline:: load_attrs ( cx, cx. tcx ( ) , self . def_id ) ,
1305
1334
source : Span :: empty ( ) ,
1306
- inner : TyMethodItem ( TyMethod {
1307
- unsafety : self . fty . unsafety ,
1308
- generics : ( & self . generics , & self . predicates , subst:: FnSpace ) . clean ( cx) ,
1309
- self_ : self_,
1310
- decl : ( self . def_id , & sig) . clean ( cx) ,
1311
- abi : self . fty . abi
1312
- } )
1335
+ inner : inner,
1313
1336
}
1314
1337
}
1315
1338
}
0 commit comments