1
Fork 0

Fix some warnings

This commit is contained in:
bjorn3 2018-10-10 19:08:52 +02:00
parent b5dffe9765
commit 0195181363
2 changed files with 2 additions and 9 deletions

View file

@ -572,7 +572,7 @@ fn trans_stmt<'a, 'tcx: 'a>(
Rvalue::Cast(CastKind::ClosureFnPointer, operand, ty) => {
unimplemented!("rval closure_fn_ptr {:?} {:?}", operand, ty)
}
Rvalue::Cast(CastKind::Unsize, operand, ty) => {
Rvalue::Cast(CastKind::Unsize, operand, _ty) => {
let operand = trans_operand(fx, operand);
operand.unsize_value(fx, lval);
}
@ -885,13 +885,6 @@ pub fn trans_checked_int_binop<'a, 'tcx: 'a>(
"checked int binop requires lhs and rhs of same type"
);
}
let res_ty = match out_ty.sty {
ty::Tuple(tys) => tys[0],
_ => bug!(
"Checked int binop requires tuple as output, but got {:?}",
out_ty
),
};
let lhs = in_lhs.load_value(fx);
let rhs = in_rhs.load_value(fx);

View file

@ -307,7 +307,7 @@ pub fn codegen_intrinsic_call<'a, 'tcx: 'a>(
let uninit_val = uninit_place.to_cvalue(fx);
ret.write_cvalue(fx, uninit_val);
};
write_bytes, <T> (v dst, v val, v count) {
write_bytes, (v dst, v val, v count) {
fx.bcx.call_memset(fx.isa, dst, val, count);
};
uninit, <T> () {