diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2019-02-16 16:37:30 +0100 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2019-02-16 16:37:30 +0100 |
| commit | ccf07adbfb51cd1d98c3ab70488bb6a880ba63e2 (patch) | |
| tree | 19194a18bc0a48dda0f46c9695bc0a4240bd0c8c | |
| parent | 4ecbee2f091cb22ebf191950cc15094a993605df (diff) | |
| download | rust-ccf07adbfb51cd1d98c3ab70488bb6a880ba63e2.tar.gz rust-ccf07adbfb51cd1d98c3ab70488bb6a880ba63e2.zip | |
Implement isize -> raw-ptr cast
| -rw-r--r-- | src/base.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/base.rs b/src/base.rs index dfa5827e03f..556e01aa3a2 100644 --- a/src/base.rs +++ b/src/base.rs @@ -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(_)) |
