bug!
more uses of these in runtime stuff
This commit is contained in:
parent
4630d1b23b
commit
e04e35133f
3 changed files with 18 additions and 18 deletions
|
@ -677,21 +677,22 @@ fn codegen_stmt<'tcx>(
|
|||
CastKind::PointerCoercion(PointerCoercion::UnsafeFnPointer),
|
||||
ref operand,
|
||||
to_ty,
|
||||
)
|
||||
| Rvalue::Cast(
|
||||
CastKind::PointerCoercion(PointerCoercion::MutToConstPointer),
|
||||
ref operand,
|
||||
to_ty,
|
||||
)
|
||||
| Rvalue::Cast(
|
||||
CastKind::PointerCoercion(PointerCoercion::ArrayToPointer),
|
||||
ref operand,
|
||||
to_ty,
|
||||
) => {
|
||||
let to_layout = fx.layout_of(fx.monomorphize(to_ty));
|
||||
let operand = codegen_operand(fx, operand);
|
||||
lval.write_cvalue(fx, operand.cast_pointer_to(to_layout));
|
||||
}
|
||||
Rvalue::Cast(
|
||||
CastKind::PointerCoercion(
|
||||
PointerCoercion::MutToConstPointer | PointerCoercion::ArrayToPointer,
|
||||
),
|
||||
..,
|
||||
) => {
|
||||
bug!(
|
||||
"{:?} is for borrowck, and should never appear in codegen",
|
||||
to_place_and_rval.1
|
||||
);
|
||||
}
|
||||
Rvalue::Cast(
|
||||
CastKind::IntToInt
|
||||
| CastKind::FloatToFloat
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue