about summary refs log tree commit diff
path: root/clippy_lints/src/methods
AgeCommit message (Collapse)AuthorLines
2021-02-15Only store a LocalDefId in hir::TraitItem.Camille GILLOT-3/+3
2021-02-15Only store a LocalDefId in hir::Item.Camille GILLOT-2/+1
Items are guaranteed to be HIR owner.
2021-02-11Merge commit '70c0f90453701e7d6d9b99aaa1fc6a765937b736' into clippyupflip1995-39/+207
2021-02-09Rename HIR UnOp variantsÖmer Sinan Ağacan-7/+7
This renames the variants in HIR UnOp from enum UnOp { UnDeref, UnNot, UnNeg, } to enum UnOp { Deref, Not, Neg, } Motivations: - This is more consistent with the rest of the code base where most enum variants don't have a prefix. - These variants are never used without the `UnOp` prefix so the extra `Un` prefix doesn't help with readability. E.g. we don't have any `UnDeref`s in the code, we only have `UnOp::UnDeref`. - MIR `UnOp` type variants don't have a prefix so this is more consistent with MIR types. - "un" prefix reads like "inverse" or "reverse", so as a beginner in rustc code base when I see "UnDeref" what comes to my mind is something like "&*" instead of just "*".
2021-02-03Suggest panic!("{}", ..) instead of panic!(..) clippy::expect_fun_call.Mara Bos-1/+1
2021-01-30Merge commit '95c0459217d1661edfa794c8bb122452b92fb485' into clippyupflip1995-54/+188
2021-01-18Rollup merge of #81038 - flip1995:clippyup, r=ManishearthAshley Mannix-1/+1
Update Clippy Biweekly Clippy update r? ``@Manishearth``
2021-01-16Review changesJack Huey-1/+1
2021-01-15Merge commit '953f024793dab92745fee9cd2c4dee6a60451771' into clippyupflip1995-1/+1
2021-01-14Auto merge of #79328 - c410-f3r:hir-if, r=matthewjasperbors-0/+7
Reintroduce hir::ExprKind::If Basically copied and paste #59288/https://github.com/rust-lang/rust-clippy/pull/4080 with some modifications. The vast majority of tests were fixed and now there are only a few remaining. Since I am still unable to figure out the missing pieces, any help with the following list is welcome. - [ ] **Unnecessary `typeck` exception**: [Cheated on this one to make CI green.](https://github.com/rust-lang/rust/pull/79328/files#diff-3faee9ba23fc54a12b7c43364ba81f8c5660045c7e1d7989a02a0cee1c5b2051) - [x] **Incorrect span**: [Span should reference `then` and `else` separately.](https://github.com/rust-lang/rust/pull/79328/files#diff-cf2c46e82222ee4b1037a68fff8a1af3c4f1de7a6b3fd798aacbf3c0475abe3d) - [x] **New note regarding `assert!`**: [Modified but not "wrong". Maybe can be a good thing?](https://github.com/rust-lang/rust/pull/79328/files#diff-9e0d7c89ed0224e2b62060c957177c27db43c30dfe3c2974cb6b5091cda9cfb5) - [x] **Inverted report location**: [Modified but not "wrong". Locations were inverted.](https://github.com/rust-lang/rust/pull/79328/files#diff-f637ce7c1f68d523a165aa9651765df05e36c4d7d279194b1a6b28b48a323691) - [x] **`src/test/ui/point-to-type-err-cause-on-impl-trait-return.rs` has weird errors**: [Not sure why this is happening.](https://github.com/rust-lang/rust/pull/79328/files#diff-c823c09660f5b112f95e97e8ff71f1797b6c7f37dbb3d16f8e98bbaea8072e95) - [x] **Missing diagnostic**: [???](https://github.com/rust-lang/rust/pull/79328/files#diff-6b8ab09360d725ba4513933827f9796b42ff9522b0690f80b76de067143af2fc)
2021-01-12Separate out a `hir::Impl` structJoshua Nelson-1/+1
This makes it possible to pass the `Impl` directly to functions, instead of having to pass each of the many fields one at a time. It also simplifies matches in many cases.
2021-01-07Reintroduce hir::ExprKind::IfCaio-0/+7
2020-12-20Merge commit '4911ab124c481430672a3833b37075e6435ec34d' into clippyupflip1995-51/+107
2020-12-06Merge commit 'c1664c50b27a51f7a78c93ba65558e7c33eabee6' into clippyupflip1995-43/+36
2020-11-23Merge commit '3e7c6dec244539970b593824334876f8b6ed0b18' into clippyupflip1995-183/+97
2020-11-16clippy: fold by valueBastian Kauschke-2/+2
2020-11-05Merge commit 'b20d4c155d2fe3a8391f86dcf9a8c49e17188703' into clippyupflip1995-86/+237
2020-10-26Remove lint from clippyNathan Whitaker-56/+0
2020-10-09Merge commit '2f6439ae6a6803d030cceb3ee14c9150e91b328b' into clippyupflip1995-13/+11
2020-10-06Fix toolsMatthew Jasper-2/+4
2020-09-24Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyupflip1995-132/+53
2020-09-10Merge commit '5034d47f721ff4c3a3ff2aca9ef2ef3e1d067f9f' into clippyupflip1995-5/+5
2020-09-04`ty.kind` -> `ty.kind()` in rustdoc and clippyLeSeulArtichaut-29/+29
2020-08-28Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyupflip1995-96/+418
2020-08-17clippy: support `QPath::LangItem`David Wood-1/+1
This commit updates clippy with the introduction of `QPath::LangItem` so that it still compiles. Signed-off-by: David Wood <david@davidtw.co>
2020-08-11Merge commit '09bd400243ed6f7059fedc0c1623aae3792521d6' into clippyupflip1995-25/+42
2020-07-27introduce PredicateAtomBastian Kauschke-1/+1
2020-07-27this might be unqualified, but at least it's now quantifiedBastian Kauschke-1/+1
2020-07-27clippyBastian Kauschke-6/+3
2020-07-26Merge commit 'da5a6fb1b65ec6581a67e942a3850f6bc15a552c' into clippyupflip1995-3/+8
2020-07-17Rename TypeckTables to TypeckResults.Valentin Lazureanu-61/+67
2020-07-14Merge commit '2ca58e7dda4a9eb142599638c59dc04d15961175' into clippyupflip1995-26/+13
2020-07-03Use 'tcx for references to AccessLevels wherever possible.Eduard-Mihai Burtescu-132/+98
2020-07-02rustc_lint: avoid using TypeckTables::empty for LateContext.Eduard-Mihai Burtescu-5/+5
2020-06-26rustc_lint: only query `typeck_tables_of` when a lint needs it.Eduard-Mihai Burtescu-62/+65
2020-06-10Update Clippy for MethodCall changesAaron Hill-8/+8
2020-06-09Merge commit 'ff0993c5e9162ddaea78e83d0f0161e68bd4ea73' into clippyLzu Tao-32/+148
2020-05-28Merge commit '7ea7cd165ad6705603852771bf82cc2fd6560db5' into clippyup2flip1995-11/+23
2020-05-20introduce newtype'd `Predicate<'tcx>`Bastian Kauschke-3/+3
2020-05-20rename `Predicate` to `PredicateKind`, introduce aliasBastian Kauschke-2/+2
2020-05-17Merge commit 'e214ea82ad0a751563acf67e1cd9279cf302db3a' into clippyupflip1995-226/+412
2020-04-29Fixed incorrect suggestion of `clone_double_ref` lintCrazyRoka-2/+2
- Added `<_>` to suggestion - Changed help message
2020-04-26cargo dev fmtPhilipp Hansch-5/+6
2020-04-26More diagnostic itemsPhilipp Hansch-18/+24
In particular for: * `VecDeque` * `String` * `Mutex` * `HashMap` * `HashSet` cc https://github.com/rust-lang/rust/pull/71414 https://github.com/rust-lang/rust-clippy/issues/5393
2020-04-18Change note_span argument for span_lint_and_note.xiongmao86-3/+3
2020-04-18Add an Option<Span> argument to span_lint_and_help.xiongmao86-6/+13
2020-04-17Cleanup: Rename 'db' variable to 'diag'Philipp Hansch-13/+13
2020-04-16Lint map_flatten if caller is an OptionMarcin Serwin-1/+19
2020-04-14Auto merge of #5449 - phansch:diagnostic-items, r=matthiaskrgrbors-22/+19
Make use of more diagnostic items This makes use of some (not all) already existing diagnostic items. Specifically: * 79982a2: `core::mem::uninitialized`, `core::mem::zeroed`, `alloc::sync::Arc`, `alloc::sync::Rc` * 83874d0: `Option` and `Result` cc #5393 changelog: none
2020-04-14Auto merge of #5457 - phansch:sym, r=matthiaskrgrbors-5/+5
Cleanup: Use our `sym!` macro more It's much shorter than Symbol::intern and the effect should still be clear --- changelog: none