mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 20:46:07 +03:00
ProjectionElem::Subtype -> CastKind::Subtype
This commit is contained in:
+2
-2
@@ -789,7 +789,7 @@ fn is_wide_ptr<'tcx>(fx: &FunctionCx<'_, '_, 'tcx>, ty: Ty<'tcx>) -> bool {
|
||||
let operand = codegen_operand(fx, operand);
|
||||
crate::unsize::coerce_unsized_into(fx, operand, lval);
|
||||
}
|
||||
Rvalue::Cast(CastKind::Transmute, ref operand, _to_ty) => {
|
||||
Rvalue::Cast(CastKind::Transmute | CastKind::Subtype, ref operand, _to_ty) => {
|
||||
let operand = codegen_operand(fx, operand);
|
||||
lval.write_cvalue_transmute(fx, operand);
|
||||
}
|
||||
@@ -996,7 +996,7 @@ pub(crate) fn codegen_place<'tcx>(
|
||||
cplace = cplace.place_deref(fx);
|
||||
}
|
||||
PlaceElem::OpaqueCast(ty) => bug!("encountered OpaqueCast({ty}) in codegen"),
|
||||
PlaceElem::Subtype(ty) | PlaceElem::UnwrapUnsafeBinder(ty) => {
|
||||
PlaceElem::UnwrapUnsafeBinder(ty) => {
|
||||
cplace = cplace.place_transmute_type(fx, fx.monomorphize(ty));
|
||||
}
|
||||
PlaceElem::Field(field, _ty) => {
|
||||
|
||||
@@ -660,7 +660,7 @@ fn transmute_scalar<'tcx>(
|
||||
}
|
||||
}
|
||||
|
||||
/// Used for `ProjectionElem::Subtype`, `ty` has to be monomorphized before
|
||||
/// Used for `ProjectionElem::UnwrapUnsafeBinder`, `ty` has to be monomorphized before
|
||||
/// passed on.
|
||||
pub(crate) fn place_transmute_type(
|
||||
self,
|
||||
|
||||
Reference in New Issue
Block a user