diff options
| author | Maik Klein <maikklein@googlemail.com> | 2017-11-23 11:04:31 +0100 |
|---|---|---|
| committer | Ariel Ben-Yehuda <ariel.byd@gmail.com> | 2017-12-18 17:08:49 +0200 |
| commit | 6e94a7a91ea89ea4948ea99f598666ba3c9ee889 (patch) | |
| tree | 6c64bfd64bc3dc749e89198150b14be8899046a1 | |
| parent | ab0f8fcdac83333dea1105372078ad9c5ca90b81 (diff) | |
Remove branch with has_metadata
| -rw-r--r-- | src/librustc_mir/monomorphize/collector.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/librustc_mir/monomorphize/collector.rs b/src/librustc_mir/monomorphize/collector.rs index 35a82ae025b..107768829cd 100644 --- a/src/librustc_mir/monomorphize/collector.rs +++ b/src/librustc_mir/monomorphize/collector.rs @@ -789,12 +789,9 @@ fn find_vtable_types_for_unsizing<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, target_ty: Ty<'tcx>) -> (Ty<'tcx>, Ty<'tcx>) { let ptr_vtable = |inner_source: Ty<'tcx>, inner_target: Ty<'tcx>| { - if inner_source.has_metadata(tcx) { - (inner_source, inner_target) - } else { - tcx.struct_lockstep_tails(inner_source, inner_target) - } + tcx.struct_lockstep_tails(inner_source, inner_target) }; + match (&source_ty.sty, &target_ty.sty) { (&ty::TyRef(_, ty::TypeAndMut { ty: a, .. }), &ty::TyRef(_, ty::TypeAndMut { ty: b, .. })) | |
