Implement MIR, CTFE, and codegen for unsafe binders

This commit is contained in:
Michael Goulet 2025-01-31 01:24:37 +00:00
parent 7f36543a48
commit fc1a9186dc
55 changed files with 493 additions and 101 deletions

View file

@ -983,7 +983,9 @@ pub(crate) fn codegen_place<'tcx>(
cplace = cplace.place_deref(fx);
}
PlaceElem::OpaqueCast(ty) => bug!("encountered OpaqueCast({ty}) in codegen"),
PlaceElem::Subtype(ty) => cplace = cplace.place_transmute_type(fx, fx.monomorphize(ty)),
PlaceElem::Subtype(ty) | PlaceElem::UnwrapUnsafeBinder(ty) => {
cplace = cplace.place_transmute_type(fx, fx.monomorphize(ty));
}
PlaceElem::Field(field, _ty) => {
cplace = cplace.place_field(fx, field);
}