xFrednet
12c61612f7
Update lint documentation to use markdown headlines
2021-07-28 14:31:59 +02:00
flip1995
1d084b13a5
Merge commit '54a20a02ecd0e1352a871aa0990bcc8b8b03173e' into clippyup
2021-07-15 10:44:10 +02:00
xFrednet
6030428fd2
Use diagnostic items for Into
, IntoIterator
, LinkedList
, ptr::null
, prt::null_mut
2021-07-14 22:50:59 +02:00
xFrednet
2ac21889bc
Use diagnostic items for BinaryHeap
, BTreeMap
, BTreeSet
, HashMap
, HashSet
, Borrow
, Default
2021-07-14 22:02:59 +02:00
Cameron Steffen
e6ab222b81
Refactor format macro parsing
2021-07-13 08:57:16 -05:00
flip1995
ebe52869a3
Merge commit '61eb38aeda6cb54b93b872bf503d70084c4d621c' into clippyup
2021-07-01 18:17:38 +02:00
flip1995
a82a744155
Merge remote-tracking branch 'upstream/master' into rustup
2021-07-01 17:41:24 +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
xFrednet
9e54ce865c
Reuse is_expr_identity_function
for filter_map_identity
2021-06-07 23:31:17 +02:00
xFrednet
bb3b58cfcc
Reuse is_expr_identity_function
for flat_map_identity
2021-06-07 23:20:11 +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
d39a11cbe1
Remove clippy_utils::consts re-export
2021-05-27 08:52:10 -05: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
Yotam Ofek
ae0d4da764
Fix invalid syntax in from_iter_instead_of_collect
suggestion with "as Trait"
2021-05-22 21:47:11 +03: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
Mateusz Gacek
ab3094b3db
wrong_self_convention: For to_*
variant don't lint in trait impl taking self
when non-Copy
type
...
It relaxes rules for `to_*` variant, so it doesn't lint in trait definitions
and implementations anymore.
Although, non-`Copy` type implementing trait's `to_*` method taking
`self` feels not good (consumes ownership, so should be rather named `into_`), it would be better if this case was a pedantic lint (allow-by-default) instead.
2021-05-06 10:49:31 -07:00
flip1995
d605882023
Merge commit 'b71f3405606d49b9735606b479c3415a0ca9810f' into clippyup
2021-05-06 12:20:44 +02:00
Cameron Steffen
d66d37303c
Fix unnecessary_filter_map false positive
2021-05-05 16:44:00 -05: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
bors
9af07e65aa
Auto merge of #7138 - mgacek8:issue6808_iter_cloned_collect_FN_with_large_array, r=Manishearth
...
Fix FN in `iter_cloned_collect` with a large array
fixes #6808
changelog: Fix FN in `iter_cloned_collect` with a large array
I spotted that [is_iterable_array](a362a4d1d0/clippy_lints/src/loops/explicit_iter_loop.rs (L67-L75)
) function that `explicit_iter_loop` lint is using only works for array sizes <= 32.
There is this comment:
> IntoIterator is currently only implemented for array sizes <= 32 in rustc
I'm a bit confused, because I read that [IntoIterator for arrays](https://doc.rust-lang.org/src/core/array/mod.rs.html#194-201 ) with const generic `N` is stable since = "1.0.0". Although Const Generics MVP were stabilized in Rust 1.51.
Should I set MSRV for the current change? I will try to test with older compilers soon.
2021-04-27 13:44:51 +00:00
Cameron Steffen
340b570ea0
Refactor MSRV aliases
2021-04-26 16:07:48 -05:00
Mateusz Gacek
d7627dcfc8
Fix FN in iter_cloned_collect
with a large array
2021-04-26 13:03:51 -07: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
bors
411c0df1d0
Auto merge of #7064 - ThibsG:WrongSelfFix, r=giraffate
...
Fix FP in `wrong_self_convention` lint
Previously, this lint didn't check into impl block when it was implementing a trait.
Recent improvements (#6924 ) have moved this check and some impl blocks are now checked but they shouldn't, such as in #7032 .
Fixes #7032
changelog: Fix FP when not taking `self` in impl block for `wrong_self_convention` lint
2021-04-12 14:16:17 +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
ThibsG
3ce6f0d022
Fix FP in wrong_self_convention
lint
2021-04-11 13:29:08 +02: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
Cameron Steffen
7468542328
Introduce is_lang_ctor
2021-04-06 15:05:00 -05:00
Cameron Steffen
47f0c15f67
Symbol optimizations
2021-04-06 13:00:36 -05:00
Jason Newcomb
12fce55766
Fix all occurences of needless_borrow
internally
2021-04-06 10:43:47 -04:00
xFrednet
d1df73228a
A new lint for shared code in if blocks
...
* Added expression check for shared_code_in_if_blocks
* Finishing touches for the shared_code_in_if_blocks lint
* Applying PR suggestions
* Update lints yay
* Moved test into subfolder
2021-04-05 13:33:45 +02:00
bors
9ce23730e2
Auto merge of #7016 - camsteffen:bind-map-paths, r=Manishearth
...
Remove paths from bind_instead_of_map
changelog: none
2021-04-02 15:10:24 +00:00