rust/clippy_lints/src/methods
bors 2f0f4ddcf7 Auto merge of #11698 - a1phyr:waker_clone_and_wake, r=y21
Add `waker_clone_and_wake` lint to check needless `Waker` clones

Check for patterns of `waker.clone().wake()` and replace them with `waker.wake_by_ref()`.

An alternative name could be `waker_clone_then_wake`

changelog: [ `waker_clone_wake`]: new lint
2023-10-26 21:01:40 +00:00
..
bind_instead_of_map.rs Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyup 2023-07-17 10:22:32 +02:00
bytecount.rs Add more diagnostic items for clippy 2023-10-05 18:21:47 -04:00
bytes_count_to_len.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
bytes_nth.rs Merge commit '149392b0baa4730c68f3c3eadf5c6ed7b16b85a4' into clippyup 2023-02-25 19:28:50 -05:00
case_sensitive_file_extension_comparisons.rs Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyup 2023-07-17 10:22:32 +02:00
chars_cmp_with_unwrap.rs Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyup 2023-07-17 10:22:32 +02:00
chars_cmp.rs Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyup 2023-07-17 10:22:32 +02:00
chars_last_cmp_with_unwrap.rs
chars_last_cmp.rs
chars_next_cmp_with_unwrap.rs
chars_next_cmp.rs
clear_with_drain.rs Merge commit '83e42a2337dadac915c956d125f1d69132f36425' into clippyup 2023-04-11 15:31:08 +02:00
clone_on_copy.rs Move scrutinee HirId into MatchSource::TryDesugar 2023-08-14 21:43:56 +00:00
clone_on_ref_ptr.rs Add more diagnostic items for clippy 2023-10-05 18:21:47 -04:00
cloned_instead_of_copied.rs Move configuration to new clippy_config crate 2023-10-23 20:05:10 +00:00
collapsible_str_replace.rs Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyup 2023-07-17 10:22:32 +02:00
drain_collect.rs Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyup 2023-07-17 10:22:32 +02:00
err_expect.rs Move configuration to new clippy_config crate 2023-10-23 20:05:10 +00:00
expect_fun_call.rs Merge commit '7671c283a50b5d1168841f3014b14000f01dd204' into clippyup 2023-09-25 11:28:58 +02:00
extend_with_drain.rs Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyup 2023-07-17 10:22:32 +02:00
filetype_is_file.rs
filter_map_bool_then.rs Merge commit '7671c283a50b5d1168841f3014b14000f01dd204' into clippyup 2023-09-25 11:28:58 +02:00
filter_map_identity.rs move changed logic to into its own util function 2023-10-09 21:57:44 +02:00
filter_map_next.rs Move configuration to new clippy_config crate 2023-10-23 20:05:10 +00:00
filter_map.rs Merge commit '5436dba826191964ac1d0dab534b7eb6d4c878f6' into clippyup 2023-07-31 23:53:53 +02:00
filter_next.rs Improve spans for indexing expressions 2023-08-04 13:17:39 +02:00
flat_map_identity.rs move changed logic to into its own util function 2023-10-09 21:57:44 +02:00
flat_map_option.rs Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyup 2023-07-17 10:22:32 +02:00
format_collect.rs Merge commit '5436dba826191964ac1d0dab534b7eb6d4c878f6' into clippyup 2023-07-31 23:53:53 +02:00
from_iter_instead_of_collect.rs Add more diagnostic items for clippy 2023-10-05 18:21:47 -04:00
get_first.rs [get_first]: lint on non-primitive types 2023-10-04 18:07:54 +02:00
get_last_with_len.rs
get_unwrap.rs Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyup 2023-07-17 10:22:32 +02:00
implicit_clone.rs Merge commit '080b587854a73f2a8cbaecff1884860a78e2ff37' into clippyup 2023-08-24 21:32:12 +02:00
inefficient_to_string.rs Add more diagnostic items for clippy 2023-10-05 18:21:47 -04:00
inspect_for_each.rs Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyup 2023-07-17 10:22:32 +02:00
into_iter_on_ref.rs
is_digit_ascii_radix.rs Move configuration to new clippy_config crate 2023-10-23 20:05:10 +00:00
iter_cloned_collect.rs
iter_count.rs
iter_kv_map.rs s/generator/coroutine/ 2023-10-20 21:14:01 +00:00
iter_next_slice.rs Improve spans for indexing expressions 2023-08-04 13:17:39 +02:00
iter_nth_zero.rs Merge commit '37f4c1725d3fd7e9c3ffd8783246bc5589debc53' into clippyup 2023-07-02 14:59:02 +02:00
iter_nth.rs Merge commit '37f4c1725d3fd7e9c3ffd8783246bc5589debc53' into clippyup 2023-07-02 14:59:02 +02:00
iter_on_single_or_empty_collections.rs
iter_out_of_bounds.rs Add more diagnostic items for clippy 2023-10-05 18:21:47 -04:00
iter_overeager_cloned.rs Merge commit '98363cbf6a7c3f8b571a7d92a3c645bb4376e4a6' into clippyup 2023-09-12 18:44:06 +02:00
iter_skip_next.rs Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyup 2023-07-17 10:22:32 +02:00
iter_skip_zero.rs Merge commit '5436dba826191964ac1d0dab534b7eb6d4c878f6' into clippyup 2023-07-31 23:53:53 +02:00
iter_with_drain.rs Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyup 2023-07-17 10:22:32 +02:00
iterator_step_by_zero.rs Merge commit '435a8ad86c7a33bd7ffb91c59039943408d3b6aa' into clippyup 2023-05-20 15:39:26 +02:00
manual_next_back.rs Merge commit '435a8ad86c7a33bd7ffb91c59039943408d3b6aa' into clippyup 2023-05-20 15:39:26 +02:00
manual_ok_or.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
manual_saturating_arithmetic.rs Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyup 2023-07-17 10:22:32 +02:00
manual_str_repeat.rs Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyup 2023-07-17 10:22:32 +02:00
manual_try_fold.rs Move configuration to new clippy_config crate 2023-10-23 20:05:10 +00:00
map_clone.rs Move configuration to new clippy_config crate 2023-10-23 20:05:10 +00:00
map_collect_result_unit.rs Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyup 2023-07-17 10:22:32 +02:00
map_err_ignore.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
map_flatten.rs Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyup 2023-07-17 10:22:32 +02:00
map_identity.rs move changed logic to into its own util function 2023-10-09 21:57:44 +02:00
map_unwrap_or.rs Move configuration to new clippy_config crate 2023-10-23 20:05:10 +00:00
mod.rs Auto merge of #11698 - a1phyr:waker_clone_and_wake, r=y21 2023-10-26 21:01:40 +00:00
mut_mutex_lock.rs Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyup 2023-07-17 10:22:32 +02:00
needless_collect.rs Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyup 2023-07-17 10:22:32 +02:00
needless_option_as_deref.rs Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyup 2023-07-17 10:22:32 +02:00
needless_option_take.rs
no_effect_replace.rs
obfuscated_if_else.rs Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyup 2023-07-17 10:22:32 +02:00
ok_expect.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
open_options.rs Add more diagnostic items for clippy 2023-10-05 18:21:47 -04:00
option_as_ref_deref.rs Move configuration to new clippy_config crate 2023-10-23 20:05:10 +00:00
option_map_or_none.rs Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyup 2023-07-17 10:22:32 +02:00
option_map_unwrap_or.rs Move configuration to new clippy_config crate 2023-10-23 20:05:10 +00:00
or_fun_call.rs Merge commit '080b587854a73f2a8cbaecff1884860a78e2ff37' into clippyup 2023-08-24 21:32:12 +02:00
or_then_unwrap.rs Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyup 2023-07-17 10:22:32 +02:00
path_buf_push_overwrite.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
path_ends_with_ext.rs Move configuration to new clippy_config crate 2023-10-23 20:05:10 +00:00
range_zip_with_len.rs Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyup 2023-07-17 10:22:32 +02:00
read_line_without_trim.rs Merge commit '5436dba826191964ac1d0dab534b7eb6d4c878f6' into clippyup 2023-07-31 23:53:53 +02:00
readonly_write_lock.rs Merge commit '5436dba826191964ac1d0dab534b7eb6d4c878f6' into clippyup 2023-07-31 23:53:53 +02:00
redundant_as_str.rs Merge commit '7671c283a50b5d1168841f3014b14000f01dd204' into clippyup 2023-09-25 11:28:58 +02:00
repeat_once.rs Merge commit '435a8ad86c7a33bd7ffb91c59039943408d3b6aa' into clippyup 2023-05-20 15:39:26 +02:00
search_is_some.rs dogfood 2023-10-04 18:08:30 +02:00
seek_from_current.rs Add more diagnostic items for clippy 2023-10-05 18:21:47 -04:00
seek_to_start_instead_of_rewind.rs Add more diagnostic items for clippy 2023-10-05 18:21:47 -04:00
single_char_add_str.rs
single_char_insert_string.rs
single_char_pattern.rs Use is_str instead of string kind comparison 2023-02-13 19:06:22 +00:00
single_char_push_string.rs
skip_while_next.rs
stable_sort_primitive.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
str_splitn.rs Move configuration to new clippy_config crate 2023-10-23 20:05:10 +00:00
string_extend_chars.rs Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyup 2023-07-17 10:22:32 +02:00
string_lit_chars_any.rs Move configuration to new clippy_config crate 2023-10-23 20:05:10 +00:00
suspicious_command_arg_space.rs Add more diagnostic items for clippy 2023-10-05 18:21:47 -04:00
suspicious_map.rs
suspicious_splitn.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
suspicious_to_owned.rs Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyup 2023-07-17 10:22:32 +02:00
type_id_on_box.rs Merge commit '5436dba826191964ac1d0dab534b7eb6d4c878f6' into clippyup 2023-07-31 23:53:53 +02:00
uninit_assumed_init.rs Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyup 2023-07-17 10:22:32 +02:00
unit_hash.rs
unnecessary_filter_map.rs Merge commit '5436dba826191964ac1d0dab534b7eb6d4c878f6' into clippyup 2023-07-31 23:53:53 +02:00
unnecessary_fold.rs Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyup 2023-07-17 10:22:32 +02:00
unnecessary_iter_cloned.rs Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyup 2023-07-17 10:22:32 +02:00
unnecessary_join.rs Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyup 2023-07-17 10:22:32 +02:00
unnecessary_lazy_eval.rs [unnecessary_lazy_eval]: don't emit autofix suggestion if closure has return type 2023-10-16 00:47:13 +02:00
unnecessary_literal_unwrap.rs Merge commit 'b105fb4c39bc1a010807a6c076193cef8d93c109' into clippyup 2023-10-06 17:35:45 +02:00
unnecessary_sort_by.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-07-28 23:44:28 +02:00
unnecessary_to_owned.rs Move configuration to new clippy_config crate 2023-10-23 20:05:10 +00:00
unwrap_expect_used.rs Merge commit '1e8fdf492808a25d78a97e1242b835ace9924e4d' into clippyup 2023-08-11 14:05:13 +02:00
useless_asref.rs Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyup 2023-07-17 10:22:32 +02:00
utils.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
vec_resize_to_zero.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
verbose_file_reads.rs
waker_clone_wake.rs Apply suggestions 2023-10-25 15:15:29 +02:00
wrong_self_convention.rs
zst_offset.rs