@@ -764,12 +764,9 @@ fn dump_vtable_entries<'tcx>(
764
764
} ) ;
765
765
}
766
766
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 ] {
771
768
let trait_methods = tcx
772
- . associated_items ( trait_ref . def_id ( ) )
769
+ . associated_items ( trait_def_id )
773
770
. in_definition_order ( )
774
771
. filter ( |item| item. kind == ty:: AssocKind :: Fn ) ;
775
772
// Now list each method's DefId (for within its trait).
@@ -778,7 +775,7 @@ fn own_existential_vtable_entries<'tcx>(
778
775
let def_id = trait_method. def_id ;
779
776
780
777
// 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) {
782
779
debug ! ( "own_existential_vtable_entry: not vtable safe" ) ;
783
780
return None ;
784
781
}
@@ -810,7 +807,7 @@ fn vtable_entries<'tcx>(
810
807
811
808
// Lookup the shape of vtable for the trait.
812
809
let own_existential_entries =
813
- tcx. own_existential_vtable_entries ( existential_trait_ref) ;
810
+ tcx. own_existential_vtable_entries ( existential_trait_ref. def_id ( ) ) ;
814
811
815
812
let own_entries = own_existential_entries. iter ( ) . copied ( ) . map ( |def_id| {
816
813
debug ! ( "vtable_entries: trait_method={:?}" , def_id) ;
0 commit comments