Skip to content

Commit ccf07ad

Browse files
committed
Implement isize -> raw-ptr cast
1 parent 4ecbee2 commit ccf07ad

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/base.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,9 @@ fn trans_stmt<'a, 'tcx: 'a>(
482482
(ty::Uint(_), ty::RawPtr(..)) if from_ty.sty == fx.tcx.types.usize.sty => {
483483
lval.write_cvalue(fx, operand.unchecked_cast_to(dest_layout));
484484
}
485+
(ty::Int(_), ty::RawPtr(..)) if from_ty.sty == fx.tcx.types.isize.sty => {
486+
lval.write_cvalue(fx, operand.unchecked_cast_to(dest_layout));
487+
}
485488
(ty::Char, ty::Uint(_))
486489
| (ty::Uint(_), ty::Char)
487490
| (ty::Uint(_), ty::Int(_))

0 commit comments

Comments
 (0)