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

Add missing cases to the type_limits lint #13936

Merged
merged 2 commits into from
May 5, 2014

Conversation

Armavica
Copy link
Contributor

@Armavica Armavica commented May 4, 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.

Armavica added 2 commits May 4, 2014 20:42
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 bors closed this May 5, 2014
@bors bors merged commit 169a57e into rust-lang:master May 5, 2014
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.
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

Successfully merging this pull request may close these issues.

3 participants