about summary refs log tree commit diff
path: root/clippy_lints
AgeCommit message (Collapse)AuthorLines
2022-07-01Auto merge of #9085 - xFrednet:9081-update-format-push-version, ↵bors-1/+1
r=Manishearth,flip1995 Correct lint version for `format_push_string` Closes #9081 changelog: none IDK what else to say. Look I can draw an ascii penguin =D: ``` (^v^) <( )> w w ```
2022-07-01Correct lint version for `format_push_string`xFrednet-1/+1
2022-07-01Fix allow attributes in let_unit_valueAlex Macleod-12/+11
2022-07-01Fix broken hyperlinkMuhammad Hamza-6/+3
2022-06-30Fix false-positive in `equatable_if_let`dAxpeDDa-1/+3
2022-06-30Bump Clippy version -> 0.1.64Philipp Krones-1/+1
2022-06-30Merge remote-tracking branch 'upstream/master' into rustupPhilipp Krones-2976/+4315
2022-06-30Auto merge of #9068 - tamaroning:fix-typo-2022-6-30, r=giraffate,xFrednetbors-2/+2
fix typo in Clippy Lints page https://rust-lang.github.io/rust-clippy/master/#significant_drop_in_scrutinee changelog: none
2022-06-30Update large_const_arrays.rstamaron-1/+1
2022-06-30fixtamaron-1/+1
2022-06-29Don't lint `while_let_loop` when drop order would changeJason Newcomb-56/+50
2022-06-29Extract util functions from `redundant_pattern_match`Jason Newcomb-80/+4
2022-06-29Auto merge of #8981 - PrestonFrom:more_details_for_significant_drop_lint, ↵bors-50/+114
r=flip1995 Add details about how significant drop in match scrutinees can cause deadlocks Adds more details about how a significant drop in a match scrutinee can cause a deadlock and include link to documentation. changelog: Add more details to significant drop lint to explicitly show how temporaries in match scrutinees can cause deadlocks.
2022-06-28Auto merge of #9046 - xFrednet:rust-97660-expection-something-something, ↵bors-87/+156
r=Jarcho Fix `#[expect]` for most clippy lints This PR fixes most `#[expect]` - lint interactions listed in rust-lang/rust#97660. [My comment in the issue](https://github.com/rust-lang/rust/issues/97660#issuecomment-1147269504) shows the current progress (Once this is merged). I plan to work on `duplicate_mod` and `multiple_inherent_impl` and leave the rest for later. I feel like stabilizing the feature is more important than fixing the last few nits, which currently also don't work with `#[allow]`. --- changelog: none r? `@Jarcho` cc: rust-lang/rust#97660
2022-06-28Auto merge of #8355 - Jarcho:explicit_auto_deref_2, r=flip1995bors-163/+562
Add lint `explicit_auto_deref` take 2 fixes: #234 fixes: #8367 fixes: #8380 Still things to do: * ~~This currently only lints `&*<expr>` when it doesn't trigger `needless_borrow`.~~ * ~~This requires a borrow after a deref to trigger. So `*<expr>` changing `&&T` to `&T` won't be caught.~~ * The `deref` and `deref_mut` trait methods aren't linted. * Neither ~~field accesses~~, nor method receivers are linted. * ~~This probably shouldn't lint reborrowing.~~ * Full slicing to deref should probably be handled here as well. e.g. `&vec[..]` when just `&vec` would do changelog: new lint `explicit_auto_deref`
2022-06-28Move `SelfAssignment` into `Operators` lint passJason Newcomb-69/+65
2022-06-28Fix dogfoodJason Newcomb-16/+16
2022-06-28Move `PtrEq` into `Operators` lin passJason Newcomb-102/+100
2022-06-28Move `NeedlessBitwiseBool` into `Operators` lint passJason Newcomb-89/+70
2022-06-28Move `ModuloArithmetic` into `Operators` lint passJason Newcomb-53/+53
2022-06-28Move some lints from `Misc` to `Operators`Jason Newcomb-490/+524
2022-06-28Move `IntegerDivision` into `Operators` lint passJason Newcomb-65/+58
2022-06-28Move `IdentityOp` into `Operators` lint passJason Newcomb-59/+58
2022-06-28Move `FloatEqualityWithoutAbs` into `Operators` lint passJason Newcomb-121/+110
2022-06-28Move `ErasingOp` into `Operators` lint passJason Newcomb-82/+81
2022-06-28Move `EqOp` into `Operators` lint passJason Newcomb-327/+342
2022-06-28Move `DurationSubsec` into `Operators` lint passJason Newcomb-80/+80
2022-06-28Move `DoubleComparison` into `Operators` lint passJason Newcomb-101/+88
2022-06-28Move `BitMask` into `Operators` lint passJason Newcomb-166/+179
2022-06-28Move `AssignOps` into `Operators` lint passJason Newcomb-243/+261
2022-06-28Move `Arithmetic` into `Operators` lint passJason Newcomb-183/+213
2022-06-28Add `Operators` lint passJason Newcomb-73/+91
2022-06-28Code cleanupJason Newcomb-31/+26
2022-06-28Handle future precedence issues in `explicit_auto_deref` + cleanupJason Newcomb-66/+89
2022-06-28Fix `needless_borrow` suggestion when calling a trait method taking `self`Jason Newcomb-11/+44
2022-06-28Refactor `dereference.rs`Jason Newcomb-89/+83
Merge `Position` and `AutoDerefStability`
2022-06-28Lint `explicit_auto_deref` immediately after `needless_borrow`Jason Newcomb-34/+54
2022-06-28Lint `explicit_auto_deref` without a leading borrowJason Newcomb-4/+25
2022-06-28Only check parent node once in `dereference.rs`Jason Newcomb-75/+40
2022-06-28Lint field accesses in `explicit_auto_deref`Jason Newcomb-5/+45
2022-06-28Merge different parent walking loops in `dereference.rs`Jason Newcomb-224/+201
`needless_borrow` will now walk further to find the target type.
2022-06-28Don't lint `explicit_auto_deref` on reborrowsJason Newcomb-3/+35
2022-06-28Add `explicit_auto_deref` lintJason Newcomb-14/+313
2022-06-28Auto merge of #8774 - hellow554:cargo-rust-version, r=flip1995bors-13/+37
try reading rust-version from Cargo.toml Cargo.toml can contain a field `rust-version`, that acts like a MSRV of clippy.toml file: https://doc.rust-lang.org/cargo/reference/manifest.html#the-rust-version-field This will try to read that field and use it, if the clippy.toml config has no `msrv` entry changelog: respect `rust-version` from `Cargo.toml` closes #8746 closes #7765
2022-06-28Auto merge of #8639 - Jarcho:trivially_copy_pass_by_ref_5953, r=dswijbors-37/+68
`trivially_copy_pass_by_ref` fixes fixes #5953 fixes #2961 The fix for #5953 is overly aggressive, but the suggestion is so bad that it's worth the false negatives. Basically three things together: * It's not obviously wrong * It compiles * It may actually work when tested changelog: Don't lint `trivially_copy_pass_by_ref` when unsafe pointers are used. changelog: Better track lifetimes when linting `trivially_copy_pass_by_ref`.
2022-06-28try reading rust-version from Cargo.tomlMarcel Hellwig-13/+37
Cargo.toml can contain a field `rust-version`, that acts like a MSRV of clippy.toml file: https://doc.rust-lang.org/cargo/reference/manifest.html#the-rust-version-field This will try to read that field and use it, if the clippy.toml config has no `msrv` entry
2022-06-27Run cargo dev fmtPreston From-1/+1
2022-06-27Make messages more accurate, check lint enabledPreston From-12/+12
2022-06-27Auto merge of #9045 - alex-semenyuk:self_assignment_example, r=llogiqbors-3/+11
Fix example `SELF_ASSIGNMENT` changelog: Fix example in `SELF_ASSIGNMENT` docs
2022-06-27Auto merge of #8649 - ebobrow:imperative_find, r=flip1995bors-6/+199
add [`manual_find`] lint for function return case part of the implementation discussed in #7143 changelog: add [`manual_find`] lint for function return case