Skip to content

Commit b226c6e

Browse files
committed
Sync from rust bef3c3b
2 parents cf5521b + 84595c2 commit b226c6e

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/base.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -925,6 +925,10 @@ fn codegen_stmt<'tcx>(
925925
}
926926
crate::discriminant::codegen_set_discriminant(fx, lval, variant_index);
927927
}
928+
Rvalue::WrapUnsafeBinder(ref operand, _to_ty) => {
929+
let operand = codegen_operand(fx, operand);
930+
lval.write_cvalue_transmute(fx, operand);
931+
}
928932
}
929933
}
930934
StatementKind::StorageLive(_)
@@ -993,7 +997,9 @@ pub(crate) fn codegen_place<'tcx>(
993997
cplace = cplace.place_deref(fx);
994998
}
995999
PlaceElem::OpaqueCast(ty) => bug!("encountered OpaqueCast({ty}) in codegen"),
996-
PlaceElem::Subtype(ty) => cplace = cplace.place_transmute_type(fx, fx.monomorphize(ty)),
1000+
PlaceElem::Subtype(ty) | PlaceElem::UnwrapUnsafeBinder(ty) => {
1001+
cplace = cplace.place_transmute_type(fx, fx.monomorphize(ty));
1002+
}
9971003
PlaceElem::Field(field, _ty) => {
9981004
cplace = cplace.place_field(fx, field);
9991005
}

src/driver/aot.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ pub(crate) fn run_aot(
692692

693693
if tcx.dep_graph.is_fully_enabled() {
694694
for cgu in cgus {
695-
tcx.ensure().codegen_unit(cgu.name());
695+
tcx.ensure_ok().codegen_unit(cgu.name());
696696
}
697697
}
698698

0 commit comments

Comments
 (0)