about summary refs log tree commit diff
path: root/clippy_lints/src/utils/mod.rs
AgeCommit message (Collapse)AuthorLines
2023-11-02Merge commit '09ac14c901abc43bd0d617ae4a44e8a4fed98d9c' into clippyupPhilipp Krones-143/+0
2023-07-31Merge commit '5436dba826191964ac1d0dab534b7eb6d4c878f6' into clippyupPhilipp Krones-1/+1
2023-07-02Merge commit '37f4c1725d3fd7e9c3ffd8783246bc5589debc53' into clippyupPhilipp Krones-5/+7
2023-05-20Merge commit '435a8ad86c7a33bd7ffb91c59039943408d3b6aa' into clippyupPhilipp Krones-0/+140
2023-03-10Merge commit '3c06e0b1ce003912f8fe0536d3a7fe22558e38cf' into clippyupPhilipp Krones-0/+1
2022-05-05Merge commit '7c21f91b15b7604f818565646b686d90f99d1baf' into clippyupflip1995-1/+1
2022-01-13Merge commit '97a5daa65908e59744e2bc625b14849352231c75' into clippyupflip1995-1/+1
2021-05-06Merge commit 'b71f3405606d49b9735606b479c3415a0ca9810f' into clippyupflip1995-1/+1
2021-03-25Merge commit '0e87918536b9833bbc6c683d1f9d51ee2bf03ef1' into clippyupflip1995-2/+0
2021-02-25Merge commit '928e72dd10749875cbd412f74bfbfd7765dbcd8a' into clippyupflip1995-1831/+1
2021-02-11Merge commit '70c0f90453701e7d6d9b99aaa1fc6a765937b736' into clippyupflip1995-10/+47
2021-02-06Rollup merge of #81680 - camsteffen:primty, r=oli-obkJonas Schievink-1/+0
Refactor `PrimitiveTypeTable` for Clippy I removed `PrimitiveTypeTable` and added `PrimTy::ALL` and `PrimTy::from_name` in its place. This allows Clippy to use `PrimTy::from_name` for the `builtin_type_shadow` lint, and a `const` list of primitive types is deleted from Clippy code (the goal). All changes should be a little faster, if anything.
2021-02-03Use PrimTy in builtin type shadow lintCameron Steffen-1/+0
2021-02-02Merge commit '3e4179766bcecd712824da04356621b8df012ea4' into sync-from-clippyManish Goregaokar-14/+17
2021-01-30Merge commit '95c0459217d1661edfa794c8bb122452b92fb485' into clippyupflip1995-61/+76
2021-01-29Rollup merge of #81176 - camsteffen:qpath-res, r=oli-obkYuki Okushi-13/+0
Improve safety of `LateContext::qpath_res` This is my first rustc code change, inspired by hacking on clippy! The first change is to clear cached `TypeckResults` from `LateContext` when visiting a nested item. I took a hint from [here](https://github.com/rust-lang/rust/blob/5e91c4ecc09312d8b63d250a432b0f3ef83f1df7/compiler/rustc_privacy/src/lib.rs#L1300). Clippy has a `qpath_res` util function to avoid a possible ICE in `LateContext::qpath_res`. But the docs of `LateContext::qpath_res` promise no ICE. So this updates the `LateContext` method to keep its promises, and removes the util function. Related: rust-lang/rust-clippy#4545 CC ````````````@eddyb```````````` since you've done related work CC ````````````@flip1995```````````` FYI
2021-01-18Remove qpath_res util functionCameron Steffen-13/+0
2021-01-18Use ty::{IntTy,UintTy,FloatTy} in rustdoc and clippyLeSeulArtichaut-7/+6
2021-01-18Rollup merge of #81038 - flip1995:clippyup, r=ManishearthAshley Mannix-11/+24
Update Clippy Biweekly Clippy update r? ``@Manishearth``
2021-01-16Review changesJack Huey-1/+1
2021-01-15Merge commit '953f024793dab92745fee9cd2c4dee6a60451771' into clippyupflip1995-11/+24
2021-01-14Auto merge of #79328 - c410-f3r:hir-if, r=matthewjasperbors-6/+6
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-3/+3
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-6/+6
2021-01-02Merge commit '1fcc74cc9e03bc91eaa80ecf92976b0b14b3aeb6' into clippyupflip1995-2/+1
2020-12-20Merge commit '4911ab124c481430672a3833b37075e6435ec34d' into clippyupflip1995-2/+33
2020-12-11Move binder for dyn to each list itemJack Huey-2/+2
2020-12-06Merge commit 'c1664c50b27a51f7a78c93ba65558e7c33eabee6' into clippyupflip1995-0/+76
2020-11-23Fix ICE in utils::implements_traitflip1995-0/+3
This only happend when debug_assertions were enabled in rustc
2020-11-23Merge commit '3e7c6dec244539970b593824334876f8b6ed0b18' into clippyupflip1995-0/+37
2020-11-18Rollup merge of #79145 - camelid:clippy-fix-panics, r=flip1995Mara Bos-1/+19
Fix handling of panic calls This should make Clippy more resilient and will unblock #78343. This PR is made against rust-lang/rust to avoid the need for a subtree sync at ``@flip1995's`` suggestion in rust-lang/rust-clippy#6310. r? ``@flip1995`` cc ``@m-ou-se``
2020-11-17Fix handling of panic callsCamelid-1/+19
This should make Clippy more resilient and will unblock #78343. This PR is made against rust-lang/rust to avoid the need for a subtree sync at @flip1995's suggestion in rust-lang/rust-clippy#6310.
2020-11-16clippy: fold by valueBastian Kauschke-3/+3
2020-11-09Do not collect tokens for doc commentsVadim Petrochenkov-1/+1
2020-11-05Merge commit 'b20d4c155d2fe3a8391f86dcf9a8c49e17188703' into clippyupflip1995-1/+2
2020-10-28Merge commit '645ef505da378b6f810b1567806d1bcc2856395f' into clippyupEduardo Broto-1/+64
2020-10-23Merge commit 'bf1c6f9871f430e284b17aa44059e0d0395e28a6' into clippyupEduardo Broto-1/+1
2020-10-09Merge commit '2f6439ae6a6803d030cceb3ee14c9150e91b328b' into clippyupflip1995-12/+2
2020-10-06Fix toolsMatthew Jasper-2/+3
2020-09-26Move `qualify_min_const_fn` out of rustc into clippyOliver Scherer-0/+1
2020-09-24Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyupflip1995-8/+6
2020-09-10Merge commit '5034d47f721ff4c3a3ff2aca9ef2ef3e1d067f9f' into clippyupflip1995-44/+56
2020-09-04`ty.kind` -> `ty.kind()` in rustdoc and clippyLeSeulArtichaut-23/+22
2020-08-28Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyupflip1995-8/+36
2020-08-17clippy: support `QPath::LangItem`David Wood-1/+12
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-8/+46
2020-08-08Eliminate the `SessionGlobals` from `librustc_ast`.Nicholas Nethercote-1/+1
By moving `{known,used}_attrs` from `SessionGlobals` to `Session`. This means they are accessed via the `Session`, rather than via TLS. A few `Attr` methods and `librustc_ast` functions are now methods of `Session`. All of this required passing a `Session` to lots of functions that didn't already have one. Some of these functions also had arguments removed, because those arguments could be accessed directly via the `Session` argument. `contains_feature_attr()` was dead, and is removed. Some functions were moved from `librustc_ast` elsewhere because they now need to access `Session`, which isn't available in that crate. - `entry_point_type()` --> `librustc_builtin_macros` - `global_allocator_spans()` --> `librustc_metadata` - `is_proc_macro_attr()` --> `Session`
2020-07-31Rename HAIR to THIR (Typed HIR).Valentin Lazureanu-1/+1
2020-07-27introduce PredicateAtomBastian Kauschke-1/+1
2020-07-27this might be unqualified, but at least it's now quantifiedBastian Kauschke-1/+1