diff --git a/src/value_and_place.rs b/src/value_and_place.rs index ffe3ccb0eca..1b69862ce2c 100644 --- a/src/value_and_place.rs +++ b/src/value_and_place.rs @@ -701,7 +701,8 @@ pub(crate) fn place_field( }; } ty::Adt(adt_def, substs) if layout.ty.is_simd() => { - let f0_ty = adt_def.non_enum_variant().fields[0].ty(fx.tcx, substs); + let f0 = &adt_def.non_enum_variant().fields[FieldIdx::from_u32(0)]; + let f0_ty = f0.ty(fx.tcx, substs); match f0_ty.kind() { ty::Array(_, _) => {