lyj
a5ced1fc2b
rc_mutex use span_lint instead of span_lint_and_sugg
2021-06-05 21:19:05 +08:00
bors
9991040258
Auto merge of #7289 - camsteffen:needless-collect-shadow, r=Manishearth
...
Fix needless_collect with binding shadowing
changelog: Fix [`needless_collect`] weird output when a binding is shadowed
Fixes #7200
2021-06-04 15:39:16 +00:00
Joshua Nelson
390893c600
Remove doc(include)
2021-06-04 08:05:54 -04:00
lyj
c0f3c2fe27
correct lint
2021-06-04 10:44:34 +08:00
lyj
84c511facf
rc_mutex
2021-06-03 16:25:27 +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
21c829e0c8
Simplify collect expr_ty
2021-05-27 20:54:56 -05:00
Cameron Steffen
6c1ba7c1bc
Fix needless_collect with binding shadowing
2021-05-27 20:39:59 -05:00
Cameron Steffen
29b4b4c10d
Do not lint use_self on type parameters
2021-05-27 20:18:07 -05:00
Cameron Steffen
d3c20c835f
Some cleanup for use_self
2021-05-27 16:25:17 -05:00
Cameron Steffen
d39a11cbe1
Remove clippy_utils::consts re-export
2021-05-27 08:52:10 -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
bors
9c4651f2ee
Auto merge of #7187 - camsteffen:avoid-break-exported, r=flip1995,phansch
...
Add avoid_breaking_exported_api config option
changelog: Add `avoid_breaking_exported_api` config option for [`enum_variant_names`], [`large_types_passed_by_value`], [`trivially_copy_pass_by_ref`], [`unnecessary_wraps`], [`upper_case_acronyms`] and [`wrong_self_convention`].
changelog: Deprecates [`pub_enum_variant_names`] and [`wrong_pub_self_convention`] as the non-pub variants are now configurable.
changelog: Fix various false negatives for `pub` items that are not exported from the crate.
A couple changes to late passes in order to use `cx.access_levels.is_exported` rather than `item.vis.kind.is_pub`.
I'm not sure how to better document the config option or lints that are (not) affected (see comments in #6806 ). Suggestions are welcome. cc `@rust-lang/clippy`
I added `/clippy.toml` to use the config internally and `/tests/clippy.toml` to maintain a default config in ui tests.
Closes #6806
Closes #4504
2021-05-27 04:49:56 +00:00
Cameron Steffen
f3e77a454a
Fix allow on some statement lints
2021-05-26 22:07:53 -05:00
Cameron Steffen
6eea598645
Fix config file lookup
2021-05-26 21:53:43 -05:00
bors
f205dd176a
Auto merge of #7280 - camsteffen:macro-use, r=Manishearth
...
Add macro_use clippy_utils
changelog: none
2021-05-26 22:15:07 +00:00
Cameron Steffen
55ccc7a8c6
Use break api config for upper_case_acronyms
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
Cameron Steffen
5cc6635fcf
Add macro_use clippy_utils
2021-05-26 16:11:18 -05:00
mbartlett21
bcebea65c1
Run cargo fmt
2021-05-25 06:05:52 +00:00
mbartlett21
9cad27fce8
Add semicolon in needless_for_each.rs
2021-05-25 02:06:45 +00:00
mbartlett21
6d73777224
Fix same_item_push.rs
2021-05-25 02:03:31 +00:00
mbartlett21
527fb42a32
Add all the semicolons to clippy_lints
2021-05-25 01:46:33 +00:00
mbartlett21
cadad20da1
Add semicolons up to needless_for_each.rs
2021-05-25 00:54:50 +00:00
mbartlett21
1ac7e19b4c
Move semicolon_if_nothing_returned
to pedantic
2021-05-24 22:09:07 +00:00
Pietro Albini
91aa821745
remove cfg(bootstrap)
2021-05-24 11:07:48 -04:00
Cameron Steffen
24743b3968
Use UnhashMap
2021-05-24 09:48:05 -05:00
Michael Wright
2f78d57d8b
Downgrade suspicious_op..._groupings to Nursery
...
This addresses #6722 .
2021-05-24 06:44:38 +02: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
bors
87871864b3
Auto merge of #7263 - Jarcho:redundant_closure_macro, r=llogiq
...
Fix `redundant_closure` for `vec![]` macro in a closure with arguments
fixes : #7224
changelog: Fix `redundant_closure` for `vec![]` macro in a closure with arguments
2021-05-22 21:41:08 +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
Jason Newcomb
f355aebf10
Move needless_borrow
to style
2021-05-21 11:24:52 -04: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