Implement isize -> raw-ptr cast
This commit is contained in:
parent
4ecbee2f09
commit
ccf07adbfb
1 changed files with 3 additions and 0 deletions
|
@ -482,6 +482,9 @@ fn trans_stmt<'a, 'tcx: 'a>(
|
||||||
(ty::Uint(_), ty::RawPtr(..)) if from_ty.sty == fx.tcx.types.usize.sty => {
|
(ty::Uint(_), ty::RawPtr(..)) if from_ty.sty == fx.tcx.types.usize.sty => {
|
||||||
lval.write_cvalue(fx, operand.unchecked_cast_to(dest_layout));
|
lval.write_cvalue(fx, operand.unchecked_cast_to(dest_layout));
|
||||||
}
|
}
|
||||||
|
(ty::Int(_), ty::RawPtr(..)) if from_ty.sty == fx.tcx.types.isize.sty => {
|
||||||
|
lval.write_cvalue(fx, operand.unchecked_cast_to(dest_layout));
|
||||||
|
}
|
||||||
(ty::Char, ty::Uint(_))
|
(ty::Char, ty::Uint(_))
|
||||||
| (ty::Uint(_), ty::Char)
|
| (ty::Uint(_), ty::Char)
|
||||||
| (ty::Uint(_), ty::Int(_))
|
| (ty::Uint(_), ty::Int(_))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue