Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

literal out of range #144

Closed
Dylan-DPC-zz opened this issue Mar 4, 2019 · 3 comments
Closed

literal out of range #144

Dylan-DPC-zz opened this issue Mar 4, 2019 · 3 comments
Labels

Comments

@Dylan-DPC-zz
Copy link

The current build fails with:

error: literal out of range for i16
[INFO] [stdout]  --> src/lib.rs:1603:23
[INFO] [stdout]   |
[INFO] [stdout] 6 | let mut numbers = [5, 65000];
[INFO] [stdout]   |                       ^^^^^

picked this up from a crater run

@BurntSushi
Copy link
Owner

We should definitely fix this, but this seems like a bug with Rust nightly. Overflowing integer literals shouldn't cause compilation failures on Rust 2015. It was only switched to deny in Rust 2018: https://github.com/rust-lang/rfcs/blob/master/text/2438-deny-integer-literal-overflow-lint.md

@BurntSushi BurntSushi added the bug label Mar 4, 2019
@Dylan-DPC-zz
Copy link
Author

Thanks. Will create an issue upstream (if it doesn't exist)

@ehuss
Copy link

ehuss commented Mar 4, 2019

overflowing_literals was switched to deny in 2015 in rust-lang/rust#55632.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants