parent
474b324eda
commit
64ca751eb0
@ -227,7 +227,7 @@ fn check_expr(&mut self, cx: &Context, e: &ast::Expr) {
|
||||
if (negative && v > (min.abs() as u64)) ||
|
||||
(!negative && v > (max.abs() as u64)) {
|
||||
cx.span_lint(OVERFLOWING_LITERALS, e.span,
|
||||
"literal out of range for its type");
|
||||
&*format!("literal out of range for {:?}", t));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -246,7 +246,7 @@ fn check_expr(&mut self, cx: &Context, e: &ast::Expr) {
|
||||
};
|
||||
if lit_val < min || lit_val > max {
|
||||
cx.span_lint(OVERFLOWING_LITERALS, e.span,
|
||||
"literal out of range for its type");
|
||||
&*format!("literal out of range for {:?}", t));
|
||||
}
|
||||
},
|
||||
ty::ty_float(t) => {
|
||||
@ -263,7 +263,7 @@ fn check_expr(&mut self, cx: &Context, e: &ast::Expr) {
|
||||
};
|
||||
if lit_val < min || lit_val > max {
|
||||
cx.span_lint(OVERFLOWING_LITERALS, e.span,
|
||||
"literal out of range for its type");
|
||||
&*format!("literal out of range for {:?}", t));
|
||||
}
|
||||
},
|
||||
_ => ()
|
||||
|
Loading…
Reference in New Issue
Block a user