]> git.lizzy.rs Git - rust.git/commitdiff
auto merge of #15709 : hirschenberger/rust/issue-14269, r=cmr
authorbors <bors@rust-lang.org>
Tue, 5 Aug 2014 17:21:23 +0000 (17:21 +0000)
committerbors <bors@rust-lang.org>
Tue, 5 Aug 2014 17:21:23 +0000 (17:21 +0000)
Fixes missing overflow lint for i64 #14269

The `type_overflow` lint, doesn't catch the overflow for `i64` because the overflow happens earlier in the parse phase when the `u64` as biggest possible int gets casted to `i64` , without checking the for
overflows.
We can't lint in the parse phase, so we emit a compiler error, as we do for overflowing `u64`

Perhaps a consistent behaviour would be to emit a parse error for *all*  overflowing integer types.

See #14269


Trivial merge