From ff28dd324ec404285dc61c6a29ceadbf3985d7e0 Mon Sep 17 00:00:00 2001 From: "R.Chavignat" Date: Thu, 20 Aug 2015 14:50:26 +0200 Subject: [PATCH] Fixed a little oversight. --- src/types.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types.rs b/src/types.rs index 2c4d81e361d..2950a03a036 100644 --- a/src/types.rs +++ b/src/types.rs @@ -190,7 +190,7 @@ fn check_expr(&mut self, cx: &Context, expr: &Expr) { (false, true) => { span_lint(cx, CAST_POSSIBLE_OVERFLOW, expr.span, &format!("the contents of a {} may overflow a {}", cast_from, cast_to)); - if !cx.tcx.expr_ty(expr).is_signed() { + if !cast_to.is_signed() { span_lint(cx, CAST_SIGN_LOSS, expr.span, &format!("casting from {} to {} loses the sign of the value", cast_from, cast_to)); }