rust-clippy
rust-clippy copied to clipboard
A bunch of lints to catch common mistakes and improve your Rust code. Book: https://doc.rust-lang.org/clippy/
Closes #2972 - [x] Followed [lint naming conventions][lint_naming] - [x] Added passing UI tests (including committed `.stderr` file) - [x] `cargo test` passes locally - [x] Executed `cargo dev update_lints`...
Fixes #9076 #9151 #8757. Partially fixes #8771. changelog: [`trait_duplication_in_bounds`]: Reduce number of false positives.
This uses [is_nightly_build](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_feature/enum.UnstableFeatures.html#method.is_nightly_build) to determine if nightly-only lints should be added to their category, but makes no other changes. This means nightly-only lints are still registered and running, but they...
### Summary As part of [upgrading pantsbuild to Rust v1.58.0](https://github.com/pantsbuild/pants/pull/14174), we had to disable the `clippy::question_mark` lint on one segment of code because it suggested code that (a) is semantically...
### Description In my projects I upgrade to the latest Rust toolchain quickly after release. It is fairly common to have to work around bugs in clippy as part of...
### What it does Suggests using the helper shortcut method, which is shorter. https://doc.rust-lang.org/stable/std/io/trait.Seek.html#method.rewind ### Lint Name _No response_ ### Category _No response_ ### Advantage _No response_ ### Drawbacks _No...
### Summary Triple backtick code blocks are not ignored by this lint. ### Lint Name doc_link_with_quotes ### Reproducer I tried this code: ```rust //! ENV is a hash-like accessor for...
r? @xFrednet changelog: none [Rendered](https://github.com/flip1995/rust-clippy/blob/changelog/CHANGELOG.md)
### Description The new `clippy::arithmetic` lint always lints against usage of arithmetic operators. Would it be feasible to not lint in const contexts? The reasoning for the lint is the...
### Summary I expected an clippy error when using a specific type, which resolves to be an integer (`u128`). ### Reproducer I tried this code: ```rust pub type SpecificIntegerType =...