about summary refs log tree commit diff
path: root/src/tools/clippy/tests
AgeCommit message (Collapse)AuthorLines
2023-05-14Exposes false negative in clippy's diverging_sub_expressionDavid Tolnay-9/+1
2023-05-10Drop uplifted clippy::forget_copyUrgau-246/+58
2023-05-10Drop uplifted clippy::forget_refUrgau-208/+57
2023-05-10Drop uplifted clippy::drop_copyUrgau-89/+99
2023-05-10Drop uplifted clippy::drop_refUrgau-289/+55
2023-05-05Merge commit '371120bdbf58a331db5dcfb2d9cddc040f486de8' into clippyupPhilipp Krones-169/+1639
2023-05-02Rollup merge of #110955 - fee1-dead-contrib:sus-operation, r=compiler-errorsDylan DPC-107/+58
uplift `clippy::clone_double_ref` as `suspicious_double_ref_op` Split from #109842. r? ``@compiler-errors``
2023-04-28uplift `clippy::clone_double_ref` as `suspicious_double_ref_op`Deadbeef-107/+58
2023-04-27Make clippy happyMichael Goulet-12/+12
2023-04-26Make `{Arc,Rc,Weak}::ptr_eq` ignore pointer metadataAlbert Larsan-23/+7
2023-04-23Merge commit 'a3ed905928a03b6e433d0b429190bf3a847128b3' into clippyupPhilipp Krones-1251/+1558
2023-04-21Evaluate place expression in `PlaceMention`.Camille GILLOT-8/+8
2023-04-18clippy: add test for https://github.com/rust-lang/rust-clippy/issues/10645Matthias Krüger-1/+20
2023-04-14Auto merge of #110160 - petrochenkov:notagain2, r=cjgillotbors-2/+2
resolve: Pre-compute non-reexport module children Instead of repeating the same logic by walking HIR during metadata encoding. The only difference is that we are no longer encoding `macro_rules` items, but we never currently need them as a part of this list. They can be encoded separately if this need ever arises. `module_reexports` is also un-querified, because I don't see any reasons to make it a query, only overhead.
2023-04-12Special-case item attributes in the suggestion outputEsteban Küber-9/+0
2023-04-12Tweak output for 'add line' suggestionEsteban Küber-11/+28
2023-04-12resolve: Pre-compute non-reexport module childrenVadim Petrochenkov-2/+2
Instead of repeating the same logic by walking HIR during metadata encoding. The only difference is that we are no longer encoding `macro_rules` items, but we never currently need them as a part of this list. They can be encoded separately if this need ever arises. `module_reexports` is also un-querified, because I don't see any reasons to make it a query, only overhead.
2023-04-11Merge commit '83e42a2337dadac915c956d125f1d69132f36425' into clippyupPhilipp Krones-347/+2783
2023-03-29Stabilize a portion of 'once_cell'Trevor Gross-4/+4
Move items not part of this stabilization to 'lazy_cell' or 'once_cell_try'
2023-03-27Add notes to non-structural const in pattern error messageJamen Marz-0/+2
2023-03-24Merge commit 'd5e2a7aca55ed49fc943b7a07a8eba05ab5a0079' into clippyupPhilipp Krones-1297/+2271
2023-03-14Auto merge of #104833 - Swatinem:async-identity-future, r=compiler-errorsbors-5/+1
Remove `identity_future` indirection This was previously needed because the indirection used to hide some unexplained lifetime errors, which it turned out were related to the `min_choice` algorithm. Removing the indirection also solves a couple of cycle errors, large moves and makes async blocks support the `#[track_caller]`annotation. Fixes https://github.com/rust-lang/rust/issues/104826.
2023-03-13Auto merge of #108471 - clubby789:unbox-the-syntax, r=Nilstrieb,est31bors-81/+53
Remove `box_syntax` r? `@Nilstrieb` This removes the feature `box_syntax`, which allows the use of `box <expr>` to create a Box, and finalises removing use of the feature from the compiler. `box_patterns` (allowing the use of `box <pat>` in a pattern) is unaffected. It also removes `ast::ExprKind::Box` - the only way to create a 'box' expression now is with the rustc-internal `#[rustc_box]` attribute. As a temporary measure to help users move away, `box <expr>` now parses the inner expression, and emits a `MachineApplicable` lint to replace it with `Box::new` Closes #49733
2023-03-12Auto merge of #108872 - cjgillot:simp-const-prop, r=oli-obkbors-21/+24
Strengthen state tracking in const-prop Some/many of the changes are replicated between both the const-prop lint and the const-prop optimization. Behaviour changes: - const-prop opt does not give a span to propagated values. This was useless as that span's primary purpose is to diagnose evaluation failure in codegen. - we remove the `OnlyPropagateInto` mode. It was only used for function arguments, which are better modeled by a write before entry. - the tracking of assignments and discriminants make clearer that we do nothing in `NoPropagation` mode or on indirect places.
2023-03-12Remove uses of `box_syntax` in rustc and toolsclubby789-81/+53
2023-03-10Merge commit '3c06e0b1ce003912f8fe0536d3a7fe22558e38cf' into clippyupPhilipp Krones-378/+1323
2023-03-08Fortify clippy tests.Camille GILLOT-21/+24
2023-03-08Remove `identity_future` indirectionArpad Borsos-5/+1
This was previously needed because the indirection used to hide some unexplained lifetime errors, which it turned out were related to the `min_choice` algorithm. Removing the indirection also solves a couple of cycle errors, large moves and makes async blocks support the `#[track_caller]` annotation.
2023-03-08move clippy tests back to their intended directoryPietro Albini-0/+40
2023-03-02Fix array-size-threshold config deserialization errorAlex Macleod-14/+10
2023-02-25Merge commit '149392b0baa4730c68f3c3eadf5c6ed7b16b85a4' into clippyupJason Newcomb-286/+1560
2023-02-22clippy: update clippy to use new `TyCtxt::def_descr`Michael Howell-2/+2
2023-02-10Merge commit '0f7558148c22e53cd4608773b56cdfa50dcdeac3' into clippyupPhilipp Krones-211/+1535
2023-01-30Modify primary span label for E0308Esteban Küber-1/+1
The previous output was unintuitive to users.
2023-01-27Merge commit '1480cea393d0cee195e59949eabdfbcf1230f7f9' into clippyupPhilipp Krones-133/+981
2023-01-13Auto merge of #106801 - JohnTitor:rollup-xqkraw0, r=JohnTitorbors-3/+6
Rollup of 6 pull requests Successful merges: - #106608 (Render missing generics suggestion verbosely) - #106716 ([RFC 2397] Deny incorrect locations) - #106754 (Rename `Ty::is_ty_infer` -> `Ty::is_ty_or_numeric_infer`) - #106782 (Ignore tests move in git blame) - #106785 (Make blame spans better for impl wfcheck) - #106791 (Fix ICE formatting) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-01-13Rollup merge of #106608 - compiler-errors:missing-generics-verbose, r=estebankYuki Okushi-3/+6
Render missing generics suggestion verbosely It's a bit easier to read like this, especially ones that are appending new generics onto an existing list, like ": `, T`" which render somewhat poorly inline. Also don't suggest `dyn` as a type parameter to add, even if technically that's valid in edition 2015.
2023-01-13Auto merge of #106092 - asquared31415:start_lang_item_checks, r=davidtwcobors-1/+1
Add checks for the signature of the `start` lang item Closes #105963
2023-01-12Don't suggest dyn as parameter to addMichael Goulet-3/+6
2023-01-12Merge commit '7f27e2e74ef957baa382dc05cf08df6368165c74' into clippyupPhilipp Krones-454/+1343
2023-01-11add checks for the signature of the lang itemasquared31415-1/+1
2023-01-11Change `src/test` to `tests` in source files, fix tidy and testsAlbert Larsan-3/+3
2022-12-29Rollup merge of #106259 - flip1995:clippyup, r=matthiaskrgrMatthias Krüger-96/+1909
Update Clippy r? `@Manishearth` I think this was the very first sync with no conflicts whatsoever. I love this time of the year :D
2022-12-29Account for multiple multiline spans with empty paddingEsteban Küber-8/+3
Instead of ``` LL | fn oom( | __^ | | _| | || LL | || ) { | ||_- LL | | } | |__^ ``` emit ``` LL | // fn oom( LL | || ) { | ||_- LL | | } | |__^ ```
2022-12-29Merge commit '4f3ab69ea0a0908260944443c739426cc384ae1a' into clippyupPhilipp Krones-96/+1909
2022-12-19Make Clippy test no longer unsoundMichael Goulet-1/+1
2022-12-17Merge commit '4bdfb0741dbcecd5279a2635c3280726db0604b5' into clippyupPhilipp Krones-300/+1819
2022-12-02Auto merge of #104963 - petrochenkov:noaddids2, r=cjgillotbors-4/+4
rustc_ast_lowering: Stop lowering imports into multiple items Lower them into a single item with multiple resolutions instead. This also allows to remove additional `NodId`s and `DefId`s related to those additional items.
2022-12-01Merge commit 'd822110d3b5625b9dc80ccc442e06fc3cc851d76' into clippyupPhilipp Krones-1145/+1920
2022-12-01rustc_ast_lowering: Stop lowering imports into multiple itemsVadim Petrochenkov-4/+4
Lower them into a single item with multiple resolutions instead. This also allows to remove additional `NodId`s and `DefId`s related to those additional items.