| Age | Commit message (Collapse) | Author | Lines |
|
Remove ui/ from TESTNAME for foo lint example
changelog: Remove ui/ from TESTNAME in doc/adding-lints.md
This PR remove the `ui/` from the TESTNAME of the example foo lint in the 'Adding lints' documentation.
|
|
|
|
Fix `map_entry` false positive
Fixes #4219
changelog: Fix `map_entry` false positive
|
|
|
|
Don't check across macro boundary in `deref_addrof`
Fixes #4289
changelog: Allow `deref_addrof` in macros
|
|
use a structured suggestion for char-lit-as-u8
changelog: use a structured suggestion for char-lit-as-u8
|
|
|
|
|
|
Add manual_saturating_arithmetic lint
changelog: add `manual_saturating_arithmetic` lint
Fixes #1557. This lint detects manual saturating arithmetics like `x.checked_add(10u32).unwrap_or(u32::max_value())` and suggests replacing with `x.saturating_add(10u32)`.
|
|
|
|
|
|
Fix `too_many_lines` false positive
changelog: Fix `too_many_lines` false positive
|
|
|
|
Dereference one less on search_is_some and make it auto-fixable
Fixes #4453
changelog: none
|
|
|
|
lint against `MaybeUninit::uninit().assume_init()`
changelog: add `uninit_assumed_init` lint
This fixes #4272
|
|
|
|
Fix index out of bound in case of empty snippet
cc #4480
changelog: none
|
|
|
|
Rustup to rust-lang/rust#63561
changelog: none
|
|
|
|
|
|
Fixes #4364
|
|
|
|
|
|
fix misleading doc for explicit_counter_loop lint
changelog: replace misleading examples for explicit_counter_loop & more concise `Why is it bad?` section
This fixes #4472
|
|
Fix `extra_unused_lifetimes` false positive
Fixes #4291
changelog: Fix `extra_unused_lifetimes` false positive
|
|
|
|
|
|
|
|
Fixes #4291
|
|
Fix cast_lossless false positive in impl const fn
Fixes https://github.com/rust-lang/rust-clippy/issues/3656#issuecomment-526387382
changelog: Fix false positive in `cast_lossless`
|
|
Rustup to rust-lang/rust#60966
changelog: none
|
|
|
|
Fix `match_as_ref` bad suggestion
Fixes #4437
changelog: Fix `match_as_ref` bad suggestion
|
|
Fixes https://github.com/rust-lang/rust-clippy/issues/3656#issuecomment-526387382
|
|
Fix missing_const_for_fn false positive
We don't want to lint if the type of the method implements drop.
(constant functions cannot evaluate destructors)
changelog: Fix `missing_const_for_fn` false positive
Fixes #4449
|
|
|
|
|
|
|
|
|
|
|
|
More rustfix tests
<!--
Thank you for making Clippy better!
We're collecting our changelog from pull request descriptions.
If your PR only updates to the latest nightly, you can leave the
`changelog` entry as `none`. Otherwise, please write a short comment
explaining your change.
If your PR fixes an issue, you can add "fixes #issue_number" into this
PR description. This way the issue will be automatically closed when
your PR is merged.
If you added a new lint, here's a checklist for things that will be
checked during review or continuous integration.
- [ ] Followed [lint naming conventions][lint_naming]
- [ ] Added passing UI tests (including committed `.stderr` file)
- [ ] `cargo test` passes locally
- [ ] Executed `./util/dev update_lints`
- [ ] Added lint documentation
- [ ] Run `./util/dev fmt`
[lint_naming]: https://rust-lang.github.io/rfcs/0344-conventions-galore.html#lints
Note that you can skip the above if you are just opening a WIP PR in
order to get feedback.
Delete this line and everything above before opening your PR -->
cc #3630
This is probably easier reviewed per-commit.
changelog: none
|
|
Improve the cognitive_complexity lint's warning.
Adds the value of complexity limit set for the lint
to the warning.
Fixes #4466
Signed-off-by: Victor Polevoy <fx@thefx.co>
changelog: improve the `cognitive_complexity` lint's warning message.
|
|
Adds the value of complexity limit set for the lint
to the warning.
Fixes #4466
Signed-off-by: Victor Polevoy <fx@thefx.co>
|
|
|
|
We don't want to lint if any of the input parameters implement drop.
(constant functions cannot evaluate destructors)
|
|
|
|
Add note to fix toolstate
The idea from https://github.com/rust-lang/rust-clippy/pull/4462#issuecomment-525725587
It's nice that we have the documentation to guide fix toolstate.
changelog: none
|
|
|