Add missing cases to the type_limits lint#13936
Merged
bors merged 2 commits intorust-lang:masterfrom May 5, 2014
Merged
Conversation
and exhaustive testing for the `u8` type.
according to the updated type_limits lint.
bors
added a commit
that referenced
this pull request
May 5, 2014
Some cases were not correctly handled by this lint, for instance `let a = 42u8; a < 0` and `let a = 42u8; a > 255`. It led to the discovery of two useless comparisons, which I removed.
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 13, 2023
…=lnicola interior-mutable types should be 'static' rather than 'const with the 'tracking' feature enabled, `limit::Limit` is interior mutable, so the `const` `hir_def::nameres::mod_resolution::MOD_DEPTH_LIMIT` is probably meant to be `static` rather than `const`. with `const` you get a new copy of it everywhere it's used, instead of the shared, global value that seems to be the intent. This fix brought to you by the catchily-named `clippy::declare_interior_mutable_const` lint.
flip1995
pushed a commit
to flip1995/rust
that referenced
this pull request
Feb 6, 2025
changelog: [`redundant_else`]: autofix for some cases `redundant_else` can be fixed automatically.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some cases were not correctly handled by this lint, for instance
let a = 42u8; a < 0andlet a = 42u8; a > 255.It led to the discovery of two useless comparisons, which I removed.