@@ -258,7 +258,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
258258 let mut self_match_impls = vec ! [ ] ;
259259 let mut fuzzy_match_impls = vec ! [ ] ;
260260
261- self . tcx . lookup_trait_def ( trait_ref. def_id )
261+ self . tcx . trait_def ( trait_ref. def_id )
262262 . for_each_relevant_impl ( self . tcx , trait_self_ty, |def_id| {
263263 let impl_substs = self . fresh_substs_for_item ( obligation. cause . span , def_id) ;
264264 let impl_trait_ref = tcx
@@ -314,7 +314,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
314314 let trait_str = self . tcx . item_path_str ( trait_ref. def_id ) ;
315315 if let Some ( istring) = item. value_str ( ) {
316316 let istring = & * istring. as_str ( ) ;
317- let generics = self . tcx . item_generics ( trait_ref. def_id ) ;
317+ let generics = self . tcx . generics_of ( trait_ref. def_id ) ;
318318 let generic_map = generics. types . iter ( ) . map ( |param| {
319319 ( param. name . as_str ( ) . to_string ( ) ,
320320 trait_ref. substs . type_for_def ( param) . to_string ( ) )
@@ -372,7 +372,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
372372 trait_ref. skip_binder ( ) . self_ty ( ) ,
373373 true ) ;
374374 let mut impl_candidates = Vec :: new ( ) ;
375- let trait_def = self . tcx . lookup_trait_def ( trait_ref. def_id ( ) ) ;
375+ let trait_def = self . tcx . trait_def ( trait_ref. def_id ( ) ) ;
376376
377377 match simp {
378378 Some ( simp) => trait_def. for_each_impl ( self . tcx , |def_id| {
0 commit comments