-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
cast-lossless is too strict #4528
Labels
good-first-issue
These issues are a good way to get started with Clippy
Comments
flip1995
added
the
good-first-issue
These issues are a good way to get started with Clippy
label
Sep 10, 2019
I agree. Especially because all the other "cast on number to another"-lints are allow-by-default. |
flip1995
added a commit
to flip1995/rust-clippy
that referenced
this issue
Sep 19, 2019
…lip1995 Changes cast-lossless to a pedantic lint As discussed in rust-lang#4528, this moves the cast-lossless lint from `all` to `pedantic`. I couldn't tell from description alone if it should also be removed from the complexity category, so I left it as part of complexity for now. I didn't see any impact to the tests from this change, but I could be wrong (as this is my first PR). fixes rust-lang#4528 changelog: Moves cast-lossless from default to checking only as a `pedantic` lint.
flip1995
added a commit
to flip1995/rust-clippy
that referenced
this issue
Sep 19, 2019
…lip1995 Changes cast-lossless to a pedantic lint As discussed in rust-lang#4528, this moves the cast-lossless lint from `all` to `pedantic`. I couldn't tell from description alone if it should also be removed from the complexity category, so I left it as part of complexity for now. I didn't see any impact to the tests from this change, but I could be wrong (as this is my first PR). fixes rust-lang#4528 changelog: Moves cast-lossless from default to checking only as a `pedantic` lint.
bors
added a commit
that referenced
this issue
Sep 19, 2019
Changes cast-lossless to a pedantic lint As discussed in #4528, this moves the cast-lossless lint from `all` to `pedantic`. I couldn't tell from description alone if it should also be removed from the complexity category, so I left it as part of complexity for now. I didn't see any impact to the tests from this change, but I could be wrong (as this is my first PR). fixes #4528 changelog: Moves cast-lossless from default to checking only as a `pedantic` lint.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
cast-lossless
includes issuing a warning about what might happen if you change your code:warning: casting u8 to i32 may become silently lossy if you later change the type
. Given that the cast is totally safe with the code as written, this seems like it should be a pedantic lint, rather than a default one.The text was updated successfully, but these errors were encountered: