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
Yoshitomo Nakanishi
d7a380e4b9
Fix FP in default_numeric_fallback
with external macro expansion
2021-06-06 12:43:22 +09:00
Bastian Kersting
96747c1a46
Enhance semicolon_if_nothing_returned according to #7324
2021-06-05 18:54:41 +02:00
lyj
f877f54767
rc_mutex: fix test
2021-06-05 22:42:48 +08:00
lyj
896c19e2cf
rc_mutex: update doc
2021-06-05 21:42:45 +08:00
lyj
e2ec85c697
rc_mutex: add struct test
2021-06-05 21:20:02 +08:00
lyj
a5ced1fc2b
rc_mutex use span_lint instead of span_lint_and_sugg
2021-06-05 21:19:05 +08:00
Joshua Nelson
390893c600
Remove doc(include)
2021-06-04 08:05:54 -04:00
Mara Bos
38ab1a6166
Add test for not linting on assert!(cfg!(..)).
2021-06-04 10:47:03 +02:00
lyj
c0f3c2fe27
correct lint
2021-06-04 10:44:34 +08: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
Steven Engler
58491d386a
Update message for 'not_unsafe_ptr_arg_deref' lint
2021-05-30 20:19:57 -04:00
bors
d1308aecaf
Auto merge of #7292 - Jarcho:suspicious_splitn, r=flip1995
...
Add lint `suspicious_splitn`
fixes : #7245
changelog: Add lint `suspicious_splitn`
2021-05-30 20:32:22 +00: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
Jason Newcomb
4ba6afd192
Fix ICE in too_many_lines
due to wrong assumptions on braces.
2021-05-27 22:44:08 -04:00
Cameron Steffen
29b4b4c10d
Do not lint use_self on type parameters
2021-05-27 20:18:07 -05:00
Cameron Steffen
6c54f61beb
Move mini-macro to auxilary
2021-05-27 11:32:14 -05:00
bors
2fa9362448
Auto merge of #7281 - camsteffen:has-doc-fp, r=flip1995
...
Fix missing_docs_in_private_items false negative
changelog: Fix [`missing_docs_in_private_items`] false negative when the item has any `#[name = "value"]` attribute
Closes #7247 (decided not to use the rustc method since it calls `Session::check_name`, which is for rustc only)
2021-05-27 08:37:08 +00:00
bors
8066f836ec
Auto merge of #7282 - camsteffen:lint-stmt-expr, r=flip1995
...
Fix allow on some statement lints
changelog: Fix `#[allow(..)]` over statements for [`needless_collect`], [`short_circuit_statement`] and [`unnecessary_operation`]
Fixes #7171
Fixes #7202
2021-05-27 08:23:21 +00:00
Cameron Steffen
f3e77a454a
Fix allow on some statement lints
2021-05-26 22:07:53 -05:00
Cameron Steffen
3af95846a2
Add deprecated lint tests
2021-05-26 21:53:43 -05:00
Cameron Steffen
c51472b4b0
Add clippy.toml to project and tests
2021-05-26 16:53:13 -05:00
Cameron Steffen
1ce581d706
Use break api config for unnecessary_wraps
2021-05-26 16:53:13 -05:00
Cameron Steffen
3d77a2b861
Use break api config for enum_variant_names
2021-05-26 16:53:13 -05:00
Cameron Steffen
ee79077d80
Use break api config for pass by value or ref
2021-05-26 16:53:13 -05:00
Cameron Steffen
d7f47f280e
Use break api config for wrong_pub_self_convention
2021-05-26 16:53:13 -05:00
Cameron Steffen
2e2021bbda
Add avoid_breaking_exported_api config option
2021-05-26 16:35:22 -05:00
Cameron Steffen
c21b965d43
Fix missing_docs_in_private_items FP
2021-05-26 16:25:38 -05:00
bors
6d50cff45a
Auto merge of #7256 - xFrednet:7172-trick-cargos-caching-for-collection, r=flip1995
...
Adding the ability to invalidate caches to force metadata collection
This adds the discussed hack to touch `clippy_lints/src/lib.rs` to invalidate cargos cache and force metadata collection. I've decided to use the [`filetime`](https://github.com/alexcrichton/filetime ) crate instead of the touch command to make is cross-platform and just cleaner in general. Looking at the maintainers I would say that it's a save crate to use xD.
---
cc: #7172 I know this ID without looking it up now... This is not good
changelog: none
r? `@flip1995`
2021-05-25 14:08:02 +00:00
bors
41bb092185
Auto merge of #7255 - whatisaphone:feat/similar-names-wparam-lparam, r=giraffate
...
Allow wparam and lparam in similar_names
`wparam` and `lparam` are often used as generic parameter names in win32 (for example [WindowProc](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/legacy/ms633573(v=vs.85) )). This PR adds them to the similar_names exception list.
changelog: [`similar_names`] don't treat wparam and lparam as similar
2021-05-24 00:20:17 +00:00
bors
297e7433bf
Auto merge of #7264 - yotamofek:from_iter_instead_collect_as_trait, r=llogiq
...
Fix invalid syntax in `from_iter_instead_of_collect` suggestion
First attempt at contributing, hopefully this is a good start and can be improved. :)
fixes #7259
changelog: [`from_iter_instead_of_collect`] fix invalid suggestion involving "as Trait"
2021-05-22 23:08:51 +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
Jason Newcomb
60dd2b65dc
Fix redundant_closure
for vec![]
macro in a closure with arguments
2021-05-21 15:48:29 -04:00
Jason Newcomb
7db0e4f791
Suggest &mut iter
inside a closure for while_let_on_iterator
2021-05-21 12:27:40 -04:00
xFrednet
e3a1ae7bfe
Adding the ability to invalidate caches to force metadata collection
2021-05-20 22:30:49 +02:00
John Simon
2eafec182d
Allow wparam and lparam in similar_names
2021-05-20 10:20:14 -04:00
Jason Newcomb
6d4dc35882
Improve needless_borrow
lint
...
Suggest changing usages of ref bindings to match the new type
Split out some cases into new lint `ref_binding_to_reference`
2021-05-20 09:03:47 -04:00
flip1995
97705b7ea6
Merge commit '9e3cd88718cd1912a515d26dbd9c4019fd5a9577' into clippyup
2021-05-20 13:07:57 +02:00
flip1995
451ff5668b
Merge remote-tracking branch 'upstream/master' into rustup
2021-05-20 12:05:02 +02:00
bors
aa1959b90c
Auto merge of #7089 - Jarcho:multiple_impls_generic, r=Jarcho
...
Don't lint `multiple_inherent_impl` with generic arguments
fixes : #5772
changelog: Treat different generic arguments as different types in `multiple_inherent_impl`
2021-05-18 16:35:48 +00:00
Jason Newcomb
760f70312e
Improve multiple_inherent_impl
lint
...
Treat different generic arguments as different types.
Allow the lint to be ignored on the type definition, or any impl blocks.
2021-05-18 11:45:51 -04:00
Jason Newcomb
a149ba26fa
Fix ICE in implicit_return
...
async functions always return a value
2021-05-18 10:51:59 -04:00
Philipp Krones
99fb776ace
Rollup merge of #7235 - camsteffen:manual-unwrap-or-deref, r=flip1995
...
Fix another manual_unwrap_or deref FP
changelog: none (since this just piggybacks on #7233 )
Fixes #6960
2021-05-18 10:21:55 +02:00
bors
9028173b24
Auto merge of #7201 - mucinoab:master, r=giraffate
...
Remove powi, "square can be computed more efficiently"
powi(2) produces exactly the same native code as x * x
powi was part of the [`suboptimal_flops`] lint
fixes #7058
changelog: Remove powi [`suboptimal_flops`], "square can be computed more efficiently"
2021-05-18 05:28:42 +00:00
Bruno A. Muciño
be540e6596
Remove powi, "square can be computed more efficiently"
...
powi(2) produces exactly the same native code as x * x
2021-05-17 21:59:08 -05:00
Cameron Steffen
8356c485a9
Fix manual_unwrap_or FP deref reference
2021-05-17 14:20:26 -05:00