Jason Newcomb
a7f376fbd3
Add lint manual_split_once
2021-08-16 09:34:58 -04:00
flip1995
d02016d686
Merge remote-tracking branch 'upstream/master' into rustup
2021-08-12 10:58:44 +02:00
Jade
c78cc7ac1f
Add is_trait_item, refactor or_fun_call and unwrap_or_else_default
2021-08-10 14:40:26 -07:00
Jade
11ef04728c
Add unwrap_or_else_default lint
...
This will catch `unwrap_or_else(Default::default)` on Result and Option
and suggest `unwrap_or_default()` instead.
2021-08-10 14:40:26 -07:00
Vadim Petrochenkov
a1f790c8a9
Fix clippy
2021-07-31 19:31:30 +03:00
flip1995
2b20f49841
Merge commit '0cce3f643bfcbb92d5a1bb71858c9cbaff749d6b' into clippyup
2021-07-29 12:16:06 +02:00
flip1995
54e539121d
Rename two lints to comply with our lint naming convention
...
self_named_constructor -> self_named_constructors
append_instead_of_extend -> extend_with_drain
2021-07-29 12:10:18 +02:00
xFrednet
12c61612f7
Update lint documentation to use markdown headlines
2021-07-28 14:31:59 +02:00
flip1995
ebe52869a3
Merge commit '61eb38aeda6cb54b93b872bf503d70084c4d621c' into clippyup
2021-07-01 18:17:38 +02:00
Cameron Steffen
f02632cee6
Move some lints to suspicious
2021-06-25 08:53:29 -05:00
Joe Ranweiler
10122e4a48
Remove shadowed receiver in check invocation
2021-06-22 18:45:12 -07:00
Dirkjan Ochtman
a40fd6da7e
Move from-iter-instead-of-collect to pedantic
...
Since FromIterator will become part of the prelude, this lint being
warn by default is incongruous with the libs team position on the topic.
2021-06-18 22:23:25 +02:00
valentine-mario
44608b1857
added lint to check for full range of vector and suggest append
2021-06-10 09:12:06 +01:00
xFrednet
5336f88403
Move map_identity
into the methods
module
2021-06-08 19:56:59 +02:00
flip1995
6c27482115
Merge commit '3ae8faff4d46ad92f194c2a4b941c3152a701b31' into clippyup
2021-06-03 08:41:37 +02:00
Jason Newcomb
cfddf0927b
Fix type checks for manual_str_repeat
2021-05-31 09:37:13 -04:00
Jason Newcomb
97311f0906
Add lint manual_str_repeat
2021-05-30 23:26:48 -04:00
Jason Newcomb
5fa08eaf53
Evaluate constant expressions in suspicious_splitn
2021-05-30 13:25:24 -04:00
Jason Newcomb
898b6a0e07
Add lint suspicious_splitn
2021-05-30 09:49:55 -04:00
Cameron Steffen
d7f47f280e
Use break api config for wrong_pub_self_convention
2021-05-26 16:53:13 -05:00
mbartlett21
cadad20da1
Add semicolons up to needless_for_each.rs
2021-05-25 00:54:50 +00:00
flip1995
97705b7ea6
Merge commit '9e3cd88718cd1912a515d26dbd9c4019fd5a9577' into clippyup
2021-05-20 13:07:57 +02:00
ThibsG
cd241b33cb
Trigger wrong_self_convention
only if it has implicit self
2021-05-13 10:24:29 +02:00
flip1995
d605882023
Merge commit 'b71f3405606d49b9735606b479c3415a0ca9810f' into clippyup
2021-05-06 12:20:44 +02:00
Marcel Hellwig
19e7448c7f
move PATTERN_METHODS table directly into file
...
also removed rustfmt::skip
2021-05-03 16:25:05 +02:00
Marcel Hellwig
c080899848
add strip_{prefix,suffix} to PATTERN_METHODS
...
this will warn, if a single_char_pattern is used in one of the above
methods
2021-05-03 16:18:41 +02:00
flip1995
ae72f1adb9
Merge commit '7c7683c8efe447b251d6c5ca6cce51233060f6e8' into clippyup
2021-04-27 16:55:11 +02:00
Cameron Steffen
3f5be5e235
Fix cloned_instead_of_copied MSRV
2021-04-25 09:54:04 -05:00
flip1995
02bf692169
Merge commit '98e2b9f25b6db4b2680a3d388456d9f95cb28344' into clippyup
2021-04-22 11:31:13 +02:00
Cameron Steffen
5af078ac1b
Add flat_map_option lint
2021-04-16 15:23:49 -05:00
Cameron Steffen
0462666c70
Add cloned_instead_of_copied lint
2021-04-16 11:39:31 -05:00
Jason Newcomb
f6c5d8d599
Remove all usages of match_path
, match_qpath
and match_path_ast
except the author
lint.
...
Add note to fix `MATCH_TYPE_ON_DIAG_ITEM`
Add false negative test for `uninit_assumed_init`
2021-04-15 19:27:25 -04:00
Cameron Steffen
76bd5d232c
Refactor diagnostic item methods
2021-04-13 14:10:40 -05:00
Cameron Steffen
a45faf66f3
Deprecate filter_map
2021-04-10 16:59:59 -05:00
flip1995
f6d1f368db
Merge commit 'b40ea209e7f14c8193ddfc98143967b6a2f4f5c9' into clippyup
2021-04-08 17:50:13 +02:00
Jason Newcomb
12fce55766
Fix all occurences of needless_borrow
internally
2021-04-06 10:43:47 -04:00
bors
38b1fd0fa7
Auto merge of #7002 - mgacek8:issue6983_wrong_self_convention_inside_trait_impls, r=phansch
...
wrong_self_convention: fix FP inside trait impl for `to_*` method taking `&self`
fixes #6983
changelog: `wrong_self_convention`: fix FP inside trait impl for `to_*` method taking `&self`
2021-04-01 05:48:16 +00:00
Cameron Steffen
827d6aaad4
Eat dogfood
2021-03-31 14:06:27 -05:00
Cameron Steffen
21083875d2
Destructure args in methods module
2021-03-31 13:25:55 -05:00
Eric Loren
56fbbf7b8f
Suggest flatten
instead of is_some
-> unwrap
2021-03-31 11:35:24 -04:00
Mateusz Gacek
6966c78be7
wrong_self_convention: fix FP inside trait impl for to_*
method
...
When the `to_*` method takes `&self` and it is a trait implementation,
we don't trigger the lint.
2021-03-29 23:46:03 -07:00
flip1995
9f6b5de7de
Merge commit '0e87918536b9833bbc6c683d1f9d51ee2bf03ef1' into clippyup
2021-03-25 19:29:11 +01:00
Jason Newcomb
6e88900f9e
Rename contains_adt
to contains_adt_constructor
2021-03-24 16:23:02 -04:00
Jason Newcomb
99b8a67198
Fix false positive with new_ret_no_self
when returning Self
with different generic arguments
2021-03-24 16:22:28 -04:00
Cameron Steffen
9132dbdf31
Factor out eq_ty_kind
2021-03-23 10:49:12 -05:00
bors
029777f029
Auto merge of #6896 - TaKO8Ki:refactor-lints-in-methods-module, r=phansch
...
Refactor lints in methods module
This PR refactors methods lints other than the lints I refactored in https://github.com/rust-lang/rust-clippy/pull/6826 and moves some functions to methods/utils.rs.
Basically, I follow the instruction described in #6680 .
**For ease of review, I refactored step by step, keeping each commit small.**
closes https://github.com/rust-lang/rust-clippy/issues/6886
cc: `@phansch,` `@flip1995,` `@Y-Nak`
changelog: Move lints in methods module to their own modules and some function to methods/utils.rs.
2021-03-22 19:36:22 +00:00
Mateusz Gacek
2ffee89b75
search_is_some: check also when search is none
2021-03-21 21:23:36 +01:00
bors
1d3c539fbb
Auto merge of #6924 - mgacek8:issue6727_copy_types, r=llogiq
...
wrong_self_convention: `to_` convention respects `Copy` types
fixes #6727
changelog: wrong_self_convention: `to_` convention respects `Copy` types
2021-03-20 06:59:13 +00:00
Mateusz Gacek
1f2d01641d
wrong_self_convention: Enhance lint message
2021-03-19 20:29:55 +01:00
Mateusz Gacek
ea15fb2177
wrong_self_convention: to_
respects Copy
types
...
More details here:
https://rust-lang.github.io/api-guidelines/naming.html#ad-hoc-conversions-follow-as_-to_-into_-conventions-c-conv
2021-03-17 22:00:46 +01:00