]> git.lizzy.rs Git - rust.git/blobdiff - src/base.rs
Implement isize -> raw-ptr cast
[rust.git] / src / base.rs
index dfa5827e03ffd25325ee1cf270dfebf5f86a9058..556e01aa3a2198855888cef7f86603d203b0b324 100644 (file)
@@ -482,6 +482,9 @@ fn trans_stmt<'a, 'tcx: 'a>(
                         (ty::Uint(_), ty::RawPtr(..)) if from_ty.sty == fx.tcx.types.usize.sty => {
                             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::Uint(_), ty::Char)
                         | (ty::Uint(_), ty::Int(_))