@@ -650,12 +650,12 @@ pub fn normalize_and_test_predicates<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
650650/// Given a trait `trait_ref`, iterates the vtable entries
651651/// that come from `trait_ref`, including its supertraits.
652652#[ inline] // FIXME(#35870) Avoid closures being unexported due to impl Trait.
653- pub fn get_vtable_methods < ' a , ' tcx > (
653+ pub fn vtable_methods < ' a , ' tcx > (
654654 tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
655655 trait_ref : ty:: PolyTraitRef < ' tcx > )
656656 -> Vec < Option < ( DefId , & ' tcx Substs < ' tcx > ) > >
657657{
658- debug ! ( "get_vtable_methods ({:?})" , trait_ref) ;
658+ debug ! ( "vtable_methods ({:?})" , trait_ref) ;
659659
660660 supertraits ( tcx, trait_ref) . flat_map ( move |trait_ref| {
661661 let trait_methods = tcx. associated_items ( trait_ref. def_id ( ) )
@@ -664,12 +664,12 @@ pub fn get_vtable_methods<'a, 'tcx>(
664664 // Now list each method's DefId and Substs (for within its trait).
665665 // If the method can never be called from this object, produce None.
666666 trait_methods. map ( move |trait_method| {
667- debug ! ( "get_vtable_methods : trait_method={:?}" , trait_method) ;
667+ debug ! ( "vtable_methods : trait_method={:?}" , trait_method) ;
668668 let def_id = trait_method. def_id ;
669669
670670 // Some methods cannot be called on an object; skip those.
671671 if !tcx. is_vtable_safe_method ( trait_ref. def_id ( ) , & trait_method) {
672- debug ! ( "get_vtable_methods : not vtable safe" ) ;
672+ debug ! ( "vtable_methods : not vtable safe" ) ;
673673 return None ;
674674 }
675675
@@ -690,7 +690,7 @@ pub fn get_vtable_methods<'a, 'tcx>(
690690 // do not want to try and trans it, in that case (see #23435).
691691 let predicates = tcx. predicates_of ( def_id) . instantiate_own ( tcx, substs) ;
692692 if !normalize_and_test_predicates ( tcx, predicates. predicates ) {
693- debug ! ( "get_vtable_methods : predicates do not hold" ) ;
693+ debug ! ( "vtable_methods : predicates do not hold" ) ;
694694 return None ;
695695 }
696696
@@ -836,6 +836,7 @@ pub fn provide(providers: &mut ty::maps::Providers) {
836836 specialization_graph_of : specialize:: specialization_graph_provider,
837837 specializes : specialize:: specializes,
838838 trans_fulfill_obligation : trans:: trans_fulfill_obligation,
839+ vtable_methods,
839840 ..* providers
840841 } ;
841842}
@@ -846,6 +847,7 @@ pub fn provide_extern(providers: &mut ty::maps::Providers) {
846847 specialization_graph_of : specialize:: specialization_graph_provider,
847848 specializes : specialize:: specializes,
848849 trans_fulfill_obligation : trans:: trans_fulfill_obligation,
850+ vtable_methods,
849851 ..* providers
850852 } ;
851853}
0 commit comments