Skip to content

Commit 6e94a7a

Browse files
MaikKleinarielb1
authored andcommitted
Remove branch with has_metadata
1 parent ab0f8fc commit 6e94a7a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/librustc_mir/monomorphize/collector.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -789,12 +789,9 @@ fn find_vtable_types_for_unsizing<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
789789
target_ty: Ty<'tcx>)
790790
-> (Ty<'tcx>, Ty<'tcx>) {
791791
let ptr_vtable = |inner_source: Ty<'tcx>, inner_target: Ty<'tcx>| {
792-
if inner_source.has_metadata(tcx) {
793-
(inner_source, inner_target)
794-
} else {
795-
tcx.struct_lockstep_tails(inner_source, inner_target)
796-
}
792+
tcx.struct_lockstep_tails(inner_source, inner_target)
797793
};
794+
798795
match (&source_ty.sty, &target_ty.sty) {
799796
(&ty::TyRef(_, ty::TypeAndMut { ty: a, .. }),
800797
&ty::TyRef(_, ty::TypeAndMut { ty: b, .. })) |

0 commit comments

Comments
 (0)