Ben Boeckel
ecf0c76c36
Fix suspicious_map false positives
2021-03-14 16:31:55 -05:00
bors
52c25e9136
Auto merge of #6895 - iobtl:reformat_unnecessary_cast, r=llogiq
...
replace span_lint with span_lint_and_sugg along with error message
fixes : #6874
changelog: none
apologies if this may not be the most idiomatic way of doing it, any advice on changes (if any) would be greatly appreciated.
2021-03-14 15:01:01 +00:00
iobtl
1054eb0c85
use lint_unnecessary_cast for literals, suggest _
if not present
2021-03-14 08:09:08 +08:00
bors
781de34222
Auto merge of #6859 - magurotuna:if_then_some_else_none, r=giraffate
...
Implement new lint: if_then_some_else_none
Resolves #6760
changelog: Added a new lint: `if_then_some_else_none`
2021-03-13 15:54:54 +00:00
bors
92b9677864
Auto merge of #6820 - mgacek8:issue_6562_enhance_mem_replace_with_default_with_other_ctors, r=phansch
...
mem_replace_with_default: recognize some std library ctors
fixes #6562
changelog: mem_replace_with_default: recognize some common constructors equivalent to `Default::default()`
2021-03-13 15:43:00 +00:00
Jason Newcomb
2713ad4342
Properly lint macro arguments for explicit_deref_methods
2021-03-13 08:40:01 -05:00
Jason Newcomb
704f7a8e50
Keep track of whether deref
or deref_mut
was called
...
Remove more unnecessary code
2021-03-13 08:39:59 -05:00
Jason Newcomb
1666e43cc0
Remove unneeded code.
2021-03-13 08:39:56 -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
iobtl
6d2236f503
replace span_lint with span_lint_and_sugg along with error message
2021-03-13 16:54:59 +08:00
bors
65d046c9ad
Auto merge of #6892 - matthiaskrgr:inc_struct_ctor, r=Y-Nak
...
inconsistent_struct_constructor: try to make message and lint description a bit clearer
changelog: inconsistent_struct_constructor: try to make message and lint description a bit clearer
r? `@ghost`
2021-03-13 04:52:40 +00:00
Mateusz Gacek
41be515062
mem_replace_with_default: use diagnostic items intead of paths
2021-03-12 13:03:07 -08:00
Mateusz Gacek
c86ba7f92d
mem_replace_with_default: recognize some std library ctors
2021-03-12 12:57:54 -08:00
Matthias Krüger
6bc5fe4a88
inconsistent_struct_constructor: try to make message and lint description a bit clearer
2021-03-12 20:41:43 +01:00
Yoshitomo Nakanishi
93ee80ac3e
Use sym::Iterator instead of paths::ITERATOR
2021-03-13 02:10:54 +09:00
Yusuke Tanaka
11d2af7e96
Improve suggestion and make it work for macros
2021-03-12 20:46:46 +09:00
Takayuki Maeda
83a955335f
fix interning-defined-symbol error
2021-03-11 20:18:33 +09:00
Takayuki Maeda
99f860768c
remove unused imports
2021-03-11 20:02:29 +09:00
Takayuki Maeda
c711de28ee
move expect_fun_call to its own module
2021-03-11 19:40:50 +09:00
Takayuki Maeda
f49349bf33
move or_fun_call to its own module
2021-03-11 19:40:24 +09:00
Takayuki Maeda
b0824bf75f
move map_unwrap_or to its own module
2021-03-11 19:40:24 +09:00
Takayuki Maeda
5557596926
move option_map_or_none to its own module
2021-03-11 19:40:24 +09:00
Takayuki Maeda
bbed852f6f
unnecessary_fold to its own module
2021-03-11 19:40:24 +09:00
Takayuki Maeda
78e572c627
move useless_asref to its own module
2021-03-11 19:40:24 +09:00
Takayuki Maeda
caaba8270c
move clone_on_copy to its own module
2021-03-11 19:40:24 +09:00
Takayuki Maeda
171c4c1485
move iter_skip_next to its own module
2021-03-11 19:40:24 +09:00
Takayuki Maeda
24909fabd2
move map_flatten and search_is_some to their own modules
2021-03-11 19:40:24 +09:00
Takayuki Maeda
37ba779a53
move flat_map_identity to its own module
2021-03-11 19:40:24 +09:00
Takayuki Maeda
f430384f04
move filter_map_flat_map to its own module
2021-03-11 19:40:24 +09:00
Takayuki Maeda
6d941616f9
move filter_flat_map to its own module
2021-03-11 19:40:24 +09:00
Takayuki Maeda
2baf043c37
move filter_map_next to its own module
2021-03-11 19:40:24 +09:00
Takayuki Maeda
805dcd12d4
move filter_map_map to its own module
2021-03-11 19:40:24 +09:00
Takayuki Maeda
183daeb961
move filter_map to its own module
2021-03-11 19:40:24 +09:00
Takayuki Maeda
2561b7ea06
move from_iter_insteam_of_collect to its own module
2021-03-11 19:40:24 +09:00
Takayuki Maeda
0c8d143515
move into_iter_on_ref and single_char_pattern to their own modules
2021-03-11 19:40:22 +09:00
Takayuki Maeda
805aa47f43
move single_char_push_string to its own module
2021-03-11 19:40:00 +09:00
Takayuki Maeda
8006dab817
move single_char_insert_string to its own module
2021-03-11 19:40:00 +09:00
Takayuki Maeda
2ade32ddf2
move string_extend_chars and clone_on_ref_ptr to their own module
2021-03-11 19:40:00 +09:00
Takayuki Maeda
b5d809a660
move wrong_self_convention to its own module
2021-03-11 19:40:00 +09:00
Takayuki Maeda
5912ca986c
move iter_nth, iter_nth_zero and iterator_step_by_zero to their own module
2021-03-11 19:39:58 +09:00
Takayuki Maeda
3fe099ba8d
move iter_next_slice to its own module
2021-03-11 19:37:16 +09:00
Takayuki Maeda
db91d9cf9a
move map_collect_result_unit to its own module
2021-03-11 19:37:16 +09:00
Takayuki Maeda
9b0a42b67d
move zst_offset to its own module
2021-03-11 19:37:16 +09:00
Takayuki Maeda
6376da70be
replace lints
and lint
with check
2021-03-11 19:37:16 +09:00
Takayuki Maeda
45ee914df0
move iter_cloned_collect to its own module
2021-03-11 19:37:16 +09:00
Takayuki Maeda
35147d4cf3
move uninit_assumed_init to its own module
2021-03-11 19:37:16 +09:00
Takayuki Maeda
8623b331ee
move filetype_is_file to its own module
2021-03-11 19:37:16 +09:00
Takayuki Maeda
60a053725e
move suspicious_map to its own module
2021-03-11 19:37:16 +09:00
Takayuki Maeda
110dac7f58
move option_as_ref_deref to its own module
2021-03-11 19:37:16 +09:00
Takayuki Maeda
483bac2dc0
move skip_while_next to its own module
2021-03-11 19:37:16 +09:00