]> git.lizzy.rs Git - rust.git/commitdiff
Fix some warnings
authorbjorn3 <bjorn3@users.noreply.github.com>
Wed, 10 Oct 2018 17:08:52 +0000 (19:08 +0200)
committerbjorn3 <bjorn3@users.noreply.github.com>
Wed, 10 Oct 2018 17:08:52 +0000 (19:08 +0200)
src/base.rs
src/intrinsics.rs

index bbc090d503b4c520a415f10780fb45c4ad075027..5d6052ea99e9563e460773f2bc30c2953cf33c59 100644 (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);
index 86f4f2e70b1363f0edeec2363f3c7dc7966bab48..b143c5789c7a549809069534db4e2b85d2212be4 100644 (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> () {