Sync from rust 4800c7816ee1937d028407066d229f74b4673c92
This commit is contained in:
commit
6e42ca187f
@ -67,7 +67,7 @@ fn clif_type_from_ty<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> Option<types::Typ
|
||||
pointer_ty(tcx)
|
||||
}
|
||||
}
|
||||
ty::Adt(adt_def, _) if adt_def.repr.simd() => {
|
||||
ty::Adt(adt_def, _) if adt_def.repr().simd() => {
|
||||
let (element, count) = match &tcx.layout_of(ParamEnv::reveal_all().and(ty)).unwrap().abi
|
||||
{
|
||||
Abi::Vector { element, count } => (element.clone(), *count),
|
||||
|
@ -127,7 +127,7 @@ pub(crate) fn coerce_unsized_into<'tcx>(
|
||||
(&ty::Adt(def_a, _), &ty::Adt(def_b, _)) => {
|
||||
assert_eq!(def_a, def_b);
|
||||
|
||||
for i in 0..def_a.variants[VariantIdx::new(0)].fields.len() {
|
||||
for i in 0..def_a.variant(VariantIdx::new(0)).fields.len() {
|
||||
let src_f = src.value_field(fx, mir::Field::new(i));
|
||||
let dst_f = dst.place_field(fx, mir::Field::new(i));
|
||||
|
||||
@ -200,7 +200,7 @@ pub(crate) fn size_and_align_of_dst<'tcx>(
|
||||
|
||||
// Packed types ignore the alignment of their fields.
|
||||
if let ty::Adt(def, _) = layout.ty.kind() {
|
||||
if def.repr.packed() {
|
||||
if def.repr().packed() {
|
||||
unsized_align = sized_align;
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ fn codegen_field<'tcx>(
|
||||
}
|
||||
match field_layout.ty.kind() {
|
||||
ty::Slice(..) | ty::Str | ty::Foreign(..) => simple(fx),
|
||||
ty::Adt(def, _) if def.repr.packed() => {
|
||||
ty::Adt(def, _) if def.repr().packed() => {
|
||||
assert_eq!(layout.align.abi.bytes(), 1);
|
||||
simple(fx)
|
||||
}
|
||||
@ -816,7 +816,7 @@ pub(crate) fn assert_assignable<'tcx>(
|
||||
// dyn for<'r> Trait<'r> -> dyn Trait<'_> is allowed
|
||||
}
|
||||
(&ty::Adt(adt_def_a, substs_a), &ty::Adt(adt_def_b, substs_b))
|
||||
if adt_def_a.did == adt_def_b.did =>
|
||||
if adt_def_a.did() == adt_def_b.did() =>
|
||||
{
|
||||
let mut types_a = substs_a.types();
|
||||
let mut types_b = substs_b.types();
|
||||
|
Loading…
x
Reference in New Issue
Block a user