1
Fork 0

change is_subtype to relate_types

This commit is contained in:
ouz-a 2023-09-30 13:44:31 +03:00
parent cd7f471931
commit 6f0c5ee2d4
15 changed files with 128 additions and 86 deletions

View file

@ -674,12 +674,14 @@ impl<'tcx> CPlace<'tcx> {
}
}
/// Used for `ProjectionElem::Subtype`, ty has to be monomorphized before
/// passed on.
pub(crate) fn place_transmute_type(
self,
fx: &mut FunctionCx<'_, '_, 'tcx>,
ty: Ty<'tcx>,
) -> CPlace<'tcx> {
CPlace { inner: self.inner, layout: fx.layout_of(fx.monomorphize(ty)) }
CPlace { inner: self.inner, layout: fx.layout_of(ty) }
}
pub(crate) fn place_field(