@@ -764,12 +764,9 @@ fn dump_vtable_entries<'tcx>(
764764 } ) ;
765765}
766766
767- fn own_existential_vtable_entries < ' tcx > (
768- tcx : TyCtxt < ' tcx > ,
769- trait_ref : ty:: PolyExistentialTraitRef < ' tcx > ,
770- ) -> & ' tcx [ DefId ] {
767+ fn own_existential_vtable_entries < ' tcx > ( tcx : TyCtxt < ' tcx > , trait_def_id : DefId ) -> & ' tcx [ DefId ] {
771768 let trait_methods = tcx
772- . associated_items ( trait_ref . def_id ( ) )
769+ . associated_items ( trait_def_id )
773770 . in_definition_order ( )
774771 . filter ( |item| item. kind == ty:: AssocKind :: Fn ) ;
775772 // Now list each method's DefId (for within its trait).
@@ -778,7 +775,7 @@ fn own_existential_vtable_entries<'tcx>(
778775 let def_id = trait_method. def_id ;
779776
780777 // Some methods cannot be called on an object; skip those.
781- if !is_vtable_safe_method ( tcx, trait_ref . def_id ( ) , & trait_method) {
778+ if !is_vtable_safe_method ( tcx, trait_def_id , & trait_method) {
782779 debug ! ( "own_existential_vtable_entry: not vtable safe" ) ;
783780 return None ;
784781 }
@@ -810,7 +807,7 @@ fn vtable_entries<'tcx>(
810807
811808 // Lookup the shape of vtable for the trait.
812809 let own_existential_entries =
813- tcx. own_existential_vtable_entries ( existential_trait_ref) ;
810+ tcx. own_existential_vtable_entries ( existential_trait_ref. def_id ( ) ) ;
814811
815812 let own_entries = own_existential_entries. iter ( ) . copied ( ) . map ( |def_id| {
816813 debug ! ( "vtable_entries: trait_method={:?}" , def_id) ;
0 commit comments