Mateusz Gacek
1835d8a238
needless_collect: Add BinaryHeap
for indirect usage lint
2021-05-04 12:38:30 -07:00
Mateusz Gacek
b1faaaeb0c
needless_collect: Lint cases with type annotations
2021-05-04 12:38:30 -07:00
Andre Bogus
63425de77d
while_immutable_cond: check condition for mutation
2021-04-29 10:10:58 +02:00
flip1995
ae72f1adb9
Merge commit '7c7683c8efe447b251d6c5ca6cce51233060f6e8' into clippyup
2021-04-27 16:55:11 +02:00
Andre Bogus
efc4c6c957
extend single_element_loop
to match .iter()
2021-04-26 15:58:58 +02:00
flip1995
02bf692169
Merge commit '98e2b9f25b6db4b2680a3d388456d9f95cb28344' into clippyup
2021-04-22 11:31:13 +02:00
Cameron Steffen
b049c88fbe
Eat dogfood
2021-04-16 11:39:31 -05:00
bors
c3ef585328
Auto merge of #6982 - Jarcho:explicit_into_iter_loop_fp, r=flip1995
...
Fix `explicit_into_iter_loop`
fixes : #6900
changelog: Only lint when `into_iter` is an implementation of `IntoIterator`
2021-04-12 09:45:32 +00:00
bors
aecccbc579
Auto merge of #7047 - camsteffen:lang-ctor, r=flip1995
...
Introduce `is_lang_ctor`
changelog: none
Replaces `is_some_ctor` and `is_ok_ctor`. Removes many path usages.
2021-04-12 08:52:10 +00:00
flip1995
f6d1f368db
Merge commit 'b40ea209e7f14c8193ddfc98143967b6a2f4f5c9' into clippyup
2021-04-08 17:50:13 +02:00
flip1995
ffa2b7da29
Merge remote-tracking branch 'upstream/master' into rustup
2021-04-08 17:36:41 +02:00
Cameron Steffen
7468542328
Introduce is_lang_ctor
2021-04-06 15:05:00 -05:00
Jason Newcomb
6b5778eb17
Fix explicit_into_iter_loop
...
Only lint when `into_iter` is an implementation of `IntoIterator`
Minor cleanups
2021-04-06 12:12:32 -04:00
Jason Newcomb
12fce55766
Fix all occurences of needless_borrow
internally
2021-04-06 10:43:47 -04:00
Amanieu d'Antras
879bfeca54
Use AnonConst for asm! constants
2021-04-06 12:35:41 +01:00
bors
57406c93df
Auto merge of #7018 - Y-Nak:same_item_push, r=Manishearth
...
Don't trigger `same_item_push` if the vec is used in the loop body
fixes #6987
changelog: `same_item_push`: Don't trigger if the `vec` is used in the loop body
2021-04-05 22:57:33 +00:00
Cameron Steffen
6f31ed6c8d
Use DefIdMap and similar aliases
2021-04-03 18:02:49 -05:00
Cameron Steffen
33798bb064
Improve needless_collect output
2021-04-02 10:10:54 -05:00
Cameron Steffen
4356a8f8f7
Remove redundant emit()
2021-04-02 09:38:13 -05:00
Cameron Steffen
a064534b9e
Refactor needless_collect
2021-04-02 08:41:05 -05:00
Yoshitomo Nakanishi
9f6f001988
same_item_push: Don't trigger same_item_push if the vec is used in the loop body
2021-04-02 16:28:16 +09:00
Cameron Steffen
827d6aaad4
Eat dogfood
2021-03-31 14:06:27 -05:00
Josh Stone
0dddfbf9bf
Use iter::zip in src/tools/clippy/
2021-03-26 09:33:38 -07:00
flip1995
9f6b5de7de
Merge commit '0e87918536b9833bbc6c683d1f9d51ee2bf03ef1' into clippyup
2021-03-25 19:29:11 +01:00
flip1995
1f5f184105
Merge remote-tracking branch 'upstream/master' into rustup
2021-03-25 18:38:13 +01:00
Takayuki Maeda
3b8e85a5dc
fix false positive in manual_flatten
2021-03-25 00:15:21 +09:00
Jason Newcomb
0b7ab90eca
Improvements to match_wildcard_for_single_variants
and wildcard_enum_match_arm
lints
...
Don't lint on `Result` and `Option` types.
Considers `or` patterns.
Considers variants prefixed with `Self`
Suggestions will try to find a common prefix rather than just using the full path
2021-03-17 12:04:11 -04:00
Cameron Steffen
0743e841f0
Don't re-export clippy_utils::*
2021-03-17 09:13:52 -05:00
Cameron Steffen
1c3a3e7dc6
Don't re-export clippy_utils::diagnostics::*
2021-03-15 20:06:01 -05:00
Cameron Steffen
6fc52a63d1
Move some utils to clippy_utils::source module
2021-03-15 15:34:15 -05:00
Cameron Steffen
eb7f8d6089
Move some utils to ty_utils
2021-03-15 13:44:09 -05:00
Roxane
9d5daa6f45
Fix error after rebase
2021-03-15 13:16:18 -04:00
Yoshitomo Nakanishi
93ee80ac3e
Use sym::Iterator instead of paths::ITERATOR
2021-03-13 02:10:54 +09:00
flip1995
a189df12bd
Clippy: HACK! Fix bootstrap error
...
This will be removed in the next sync, once beta is at 1.52. Until then
this hack avoids to put `cfg(bootstrap)` into Clippy.
2021-03-12 15:32:35 +01:00
flip1995
f2f2a005b4
Merge commit '6ed6f1e6a1a8f414ba7e6d9b8222e7e5a1686e42' into clippyup
2021-03-12 15:30:50 +01:00
flip1995
9c1dd0c227
Fix remaining dogfood errors (internal lints)
2021-03-11 10:57:49 +01:00
flip1995
78c740e2f3
Merge remote-tracking branch 'upstream/master' into rustup
2021-03-11 10:37:58 +01:00
Yoshitomo Nakanishi
19c886b407
Remove "for_loop_arg.rs"
2021-03-02 21:09:10 +09:00
Yoshitomo Nakanishi
74bd806b05
Simplify check_for_loop_arg
2021-03-02 18:14:20 +09:00
Yoshitomo Nakanishi
eaf63d6df7
Unify names of lint entry functions in loops to 'check'
2021-03-02 18:14:20 +09:00
nahuakang
845a3a061c
Include loops.rs changes from PR#6698
2021-03-02 18:14:20 +09:00
nahuakang
2229a0839e
Clean up: Rename some files to be consistent with lint names; import lints to each file
2021-03-02 18:14:20 +09:00
nahuakang
ecebfe0c9c
Move check_for_loop_arg back to mod; split into 4 lint files
2021-03-02 18:14:20 +09:00
nahuakang
7cfdef6de1
Move MinifyingSugg into manual_memcpy
2021-03-02 18:14:20 +09:00
nahuakang
7158c944a4
Refactor while let loop to its own module
2021-03-02 18:14:20 +09:00
nahuakang
287a4f8ab1
Refactor empty loop to its own module
2021-03-02 18:14:20 +09:00
nahuakang
d0b657c0b7
Refactor while let on iterator lint to its module; rename for loop explicit counter to explicit counter loop
2021-03-02 18:14:20 +09:00
nahuakang
455d0476b1
Refactor never loop to its own module
2021-03-02 18:14:20 +09:00
nahuakang
5b870e1b36
Move detect_manual_memcpy to its module; split up utils structs
2021-03-02 18:14:20 +09:00
nahuakang
2c1f676bfe
Add detect_same_item_push to its own module
2021-03-02 18:14:20 +09:00
nahuakang
453e6b97ac
Add check_needless_collect to its own module
2021-03-02 18:14:20 +09:00
nahuakang
9520cba554
Add check_infinite_loop to its own module
2021-03-02 18:13:32 +09:00
nahuakang
1e5e541ac5
Refactor check_for_single_element_loop to its own module
2021-03-02 18:13:32 +09:00
nahuakang
71026cad54
Refactor check_for_loop_explicit_counter to its own module
2021-03-02 18:13:32 +09:00
nahuakang
71c9fdf8b1
Refactor check_for_loop_range into its module
2021-03-02 18:13:32 +09:00
nahuakang
6e4663dedf
Refactor check_for_mut_range_bound to its own module
2021-03-02 18:13:32 +09:00
nahuakang
7b0f588b77
Refactor check_for_loop_over_map_kv to its own module
2021-03-02 18:13:32 +09:00
nahuakang
408368a82c
Refactor check_for_loop_arg; rename manual_flatten's lint back to check_manual_flatten
2021-03-02 18:13:32 +09:00
nahuakang
62ac4bd1b2
create loops dir; arrange manual_flatten lint and utils
2021-03-02 18:13:32 +09:00