Initial support for Rust 2021.
Clippy treated Rust 2021 as Rust 2015, because 2018 was checked with `==` instead of `>=`. This fixes that, such that 2018-specific things are also enabled for 2021.
changelog: Added support for Rust 2021.
Clippy treated Rust 2021 as Rust 2015, because 2018 was checked with
`==` instead of `>=`. This fixes that, such that 2018-specific things
are also enabled for 2021.
- Adds optional default values to const generic parameters in the AST
and HIR
- Parses these optional default values
- Adds a `const_generics_defaults` feature gate
make clippy version number correspond to rustc version number.
clippy 0.1.50 corresponds to rustc 1.50.x
This bumps the clippy version number from 0.0.212 to 0.1.50
Fixes#6499
Notes:
I used `cargo --version` because that way we can honour the version set in the `rust-toolchain` file.
When we bump the bootstrap compiler from 1.50 to 1.51, the version numbers will have to be changed to 1.51 or the test will fail.
---
changelog: make clippy version number correspond to rustc version number (rust 1.50.0 -> clippy 0.1.50)
Reassign default private
changelog: fix field_reassign_with_default false positive
* Fix#6344
* Fix assumption that `field: Default::default()` is the same as `..Default::default()`
* Cleanup some redundant logic
ISSUE_TEMPLATE: add templates for false negative and false positive tickets.
These will add the correct labels automatically so we don't have to do that ourselves :)
changelog: none
fix ci on master branch; run the --fix test in the correct directory
Turned out the --fix test was run in the wrong directory.
*Please write a short comment explaining your change (or "none" for internal only changes)*
changelog: none
ci: test cargo clippy --fix -Zunstable-options
Make sure we catch cases like https://github.com/rust-lang/rust-clippy/issues/6487 in CI in the future.
---
*Please write a short comment explaining your change (or "none" for internal only changes)*
changelog: none
readme: remove paragraph about executing clippy via "cargo run .."
This most likely no longer works since we are pinning clippy on a specific nightly now.
"cargo run" would try to compile clippy with whatever version the project we want to check demands.
Also building clippy yourself to run it on a project is not really needed anymore since clippy is shipped with official rust releases.
Fixes#6489
changelog: none
Added from_over_into lint
Closes#6456
Added a lint that searches for implementations of `Into<..>` and suggests to implement `From<..>` instead, as it comes with a default implementation of `Into`. Category: style.
changelog: added `from_over_into` lint
This most likely no longer works since we are pinning clippy on a specific nightly now.
"cargo run" would try to compile clippy with whatever version the project we want to check demands.
Also building clippy yourself to run it on a project is not really needed anymore since clippy is shipped with official rust releases.
Fixes#6489
Don't trigger large_enum_variant in external macros
Closes#1776 (the potential JSON output issue is not something we can fix in Clippy and I can't reproduce it anymore)
changelog: Don't trigger [`large_enum_variant`] in external macros
readme: remove paragraph about installing clippy manually on ci, if it is missing on a nightly
Clippy should always be available on nightly because we are gating on it in rustcs CI.
changelog: remove outdated readme paragraph