File tree 1 file changed +6
-15
lines changed
compiler/rustc_interface/src
1 file changed +6
-15
lines changed Original file line number Diff line number Diff line change @@ -918,24 +918,15 @@ fn analysis(tcx: TyCtxt<'_>, (): ()) -> Result<()> {
918
918
}
919
919
920
920
traits:: vtable:: VtblSegment :: TraitOwnEntries { trait_ref, emit_vptr } => {
921
- let existential_trait_ref = trait_ref. map_bound ( |trait_ref| {
922
- ty:: ExistentialTraitRef :: erase_self_ty ( tcx, trait_ref)
923
- } ) ;
924
-
925
921
// Lookup the shape of vtable for the trait.
926
922
let own_existential_entries =
927
- tcx. own_existential_vtable_entries ( existential_trait_ref. def_id ( ) ) ;
928
-
929
- let own_entries = own_existential_entries. iter ( ) . copied ( ) . map ( |_def_id| {
930
- // The original code here ignores the method if its predicates are impossible.
931
- // We can't really do that as, for example, all not trivial bounds on generic
932
- // parameters are impossible (since we don't know the parameters...),
933
- // see the comment above.
934
-
935
- 1
936
- } ) ;
923
+ tcx. own_existential_vtable_entries ( trait_ref. def_id ( ) ) ;
937
924
938
- unupcasted_cost += own_entries. sum :: < usize > ( ) ;
925
+ // The original code here ignores the method if its predicates are impossible.
926
+ // We can't really do that as, for example, all not trivial bounds on generic
927
+ // parameters are impossible (since we don't know the parameters...),
928
+ // see the comment above.
929
+ unupcasted_cost += own_existential_entries. len ( ) ;
939
930
940
931
if emit_vptr {
941
932
upcast_cost += 1 ;
You can’t perform that action at this time.
0 commit comments