Commit graph

15 commits

Author SHA1 Message Date
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
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
Jason Newcomb
ce5e927713
Improve map_entry lint
Fix false positives where the map is used before inserting into the map.
Fix false positives where two insertions happen.
Suggest using `if let Entry::Vacant(e) = _.entry(_)` when `or_insert` might be a semantic change
2021-04-15 08:19:40 -04:00
boxdot
d6beb18411
Remove paths::STD_PTR_NULL 2021-04-12 18:35:47 +02:00
boxdot
4f7fc11ef1
Add invalid null pointer usage lint. 2021-04-08 22:49:48 +02:00
Cameron Steffen
79d3082cd7 Remove paths::PATH_BUF 2021-04-06 11:33:59 -05:00
Elliot Bobrow
7fcd155712 Add non_octal_unix_permissions lint 2021-03-30 16:04:16 -07:00
Yoshitomo Nakanishi
93ee80ac3e Use sym::Iterator instead of paths::ITERATOR 2021-03-13 02:10:54 +09:00
flip1995
78c740e2f3
Merge remote-tracking branch 'upstream/master' into rustup 2021-03-11 10:37:58 +01:00
Andrea Nall
3877a410be migrate paths to newly-added diagnostic items
This gets rid of the following paths:
  * OS_STRING
  * TO_OWNED
  * TO_STRING

Also removes some usages of:
  * PATH_BUF

And the now completely unused `clippy_lints::types::is_ty_param_path`
2021-03-07 17:53:12 -06:00
Jason Newcomb
f21320fd74
Use diagnostic or language items instead of paths 2021-03-01 23:10:51 -05:00
Cameron Steffen
7984e60d9e Use diagnostic items in into_iter_collections 2021-03-01 09:04:11 -06:00
flip1995
f64149dd04 Merge commit '928e72dd10' into clippyup 2021-02-25 11:25:22 +01:00
flip1995
c6408a47bd
Merge remote-tracking branch 'upstream/master' into rustup 2021-02-25 10:40:00 +01:00
Samuel E. Moelius III
09bded4437 Factor out clippy_utils crate 2021-02-23 18:50:30 -05:00
Renamed from clippy_lints/src/utils/paths.rs (Browse further)