fix assertion - trait object pointers don't have infinite fields

This commit is contained in:
Alexis Beingessner 2017-08-08 10:08:08 -04:00
parent bcd75d661a
commit 6c0f2aa279

View file

@ -2197,8 +2197,8 @@ impl<'a, 'tcx> TyLayout<'tcx> {
let tcx = cx.tcx();
let ptr_field_type = |pointee: Ty<'tcx>| {
assert!(i < 2);
let slice = |element: Ty<'tcx>| {
assert!(i < 2);
if i == 0 {
tcx.mk_mut_ptr(element)
} else {