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

Build fails with nightly #21

Closed
imp opened this issue Mar 14, 2020 · 1 comment
Closed

Build fails with nightly #21

imp opened this issue Mar 14, 2020 · 1 comment

Comments

@imp
Copy link
Contributor

imp commented Mar 14, 2020

rustc -V
rustc 1.43.0-nightly (c20d7eecb 2020-03-11)
error: this arithmetic operation will overflow
   --> src/ipext.rs:569:13
    |
569 |             std::usize::MAX + 1 + count as usize
    |             ^^^^^^^^^^^^^^^^^^^ attempt to add with overflow
    |
    = note: `#[deny(arithmetic_overflow)]` on by default

error: this arithmetic operation will overflow
   --> src/ipext.rs:489:21
    |
489 |                     std::usize::MAX + 2 + count as usize
    |                     ^^^^^^^^^^^^^^^^^^^ attempt to add with overflow

error: aborting due to 2 previous errors

@krisprice
Copy link
Owner

Removed this error in nightly 2.3.0 with #[allow(arithmetic_overflow)]. The panic behavior was intentional here to mimic Rusts own count() behavior.

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

No branches or pull requests

2 participants