Cameron Steffen
5722a7dacd
Fix manual_match with let-expressions
2021-09-02 12:38:59 +01:00
flip1995
61bb96738c
Merge remote-tracking branch 'upstream/master' into rustup2
2021-09-02 12:38:17 +01:00
Cameron Steffen
ae02282ad0
Fix clippy let expressions fallout
2021-08-19 14:17:05 -05:00
Caio
b97d4c062b
Introduce hir::ExprKind::Let - Take 2
2021-08-15 16:18:26 -03:00
Jason Newcomb
251dd30d77
Improve manual_map
...
In some cases check if a borrow made in the scrutinee expression would prevent creating the closure used by `map`
2021-08-14 19:49:54 -04:00
flip1995
2b20f49841
Merge commit '0cce3f643bfcbb92d5a1bb71858c9cbaff749d6b' into clippyup
2021-07-29 12:16:06 +02:00
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
flip1995
d2c8f50bbe
Rename is_allowed
-> is_lint_allowed
2021-07-09 15:06:12 +02:00
flip1995
ebe52869a3
Merge commit '61eb38aeda6cb54b93b872bf503d70084c4d621c' into clippyup
2021-07-01 18:17:38 +02:00
Cameron Steffen
b792bb301c
Factor out match_var
2021-06-09 09:47:42 -05:00
flip1995
02bf692169
Merge commit '98e2b9f25b6db4b2680a3d388456d9f95cb28344' into clippyup
2021-04-22 11:31:13 +02:00
bors
1e0a3ff55c
Auto merge of #6937 - Jarcho:map_entry_suggestion, r=giraffate
...
Improve `map_entry` suggestion
fixes : #5176
fixes : #4674
fixes : #4664
fixes : #1450
Still need to handle the value returned by `insert` correctly.
changelog: Improve `map_entry` suggestion. Will now suggest `or_insert`, `insert_with` or `match _.entry(_)` as appopriate.
changelog: Fix `map_entry` false positives where the entry api can't be used. e.g. when the map is used for multiple things.
2021-04-16 13:23:23 +00:00
Jason Newcomb
779d98f6cc
Don't allow adjustments for manual_map
2021-04-15 10:37:42 -04:00
Jason Newcomb
bcf3488007
Minor cleanup of map_entry
and a few additional tests.
2021-04-15 08:25:24 -04:00
Jason Newcomb
3323ff7145
map_entry
improvements
...
Suggest using `or_insert_with` when possible
2021-04-15 08:22:40 -04: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
Jason Newcomb
cc7f1daab2
Don't lint manual_map
in const functions
2021-03-30 10:56:08 -04:00
Jason Newcomb
fa689f865e
Fix manual_map
at the end of an if chain
2021-03-30 09:58:23 -04:00
flip1995
9f6b5de7de
Merge commit '0e87918536b9833bbc6c683d1f9d51ee2bf03ef1' into clippyup
2021-03-25 19:29:11 +01:00
Jason Newcomb
f468d82283
Fix manual_map
suggestion for if let.. else ... if let.. else
chain
2021-03-17 12:57:42 -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
Jason Newcomb
a261bc5fad
Make explicit_deref_methods
check for multiple deref calls
...
Fix suggestion for `explicit_deref_methods`. Sometimes `&**` is needed, sometimes nothing is needed.
Allow `explicit_deref_methods` to trigger in a few new contexts.
`explicit_deref_methods` will now consider ufcs calls
2021-03-13 08:39:48 -05:00
flip1995
f2f2a005b4
Merge commit '6ed6f1e6a1a8f414ba7e6d9b8222e7e5a1686e42' into clippyup
2021-03-12 15:30:50 +01:00
Jason Newcomb
2c485e36cd
Don't move yield
or inline assembly into closure
2021-03-01 17:25:23 -05:00
Jason Newcomb
a3278a16d3
Fix manual_map
: do not expand macros in suggestions
2021-02-28 09:13:24 -05:00
Jason Newcomb
09a827ac73
Revert #6796 : Downgrade manual_map to nursery
2021-02-26 16:27:41 -05:00
Jason Newcomb
ef87e58993
Fix manual_map
: don't lint when partially moved values are used.
...
Fix `manual_map`: don't lint when `return`, `break`, and `continue` are used.
2021-02-26 16:24:25 -05:00
David Tolnay
8f47a4214e
Downgrade manual_map to nursery
2021-02-25 20:31:24 -08:00
flip1995
f64149dd04
Merge commit '928e72dd10749875cbd412f74bfbfd7765dbcd8a' into clippyup
2021-02-25 11:25:22 +01:00
Jason Newcomb
23aa2f880c
Fix dogfood errors
2021-02-21 23:15:28 -05:00
Jason Newcomb
efe33f9fe4
Add: option_manual_map lint
2021-02-21 22:06:03 -05:00