rust/clippy_lints/src
bors eaffd0e418 Auto merge of #6167 - ThibsG:IdenticalArgumentsAssertEq3574, r=ebroto
Identical arguments on assert macro family

Lint when identical args are used on `assert_eq!`, `debug_assert_eq!`, `assert_ne!` and `debug_assert_ne!` macros.

Added to the lint `eq_op`.

Common functions added to `utils/higher.rs`

Fixes: #3574
Fixes: #4694

changelog: Lint on identical args when calling `assert_eq!`, `debug_assert_eq!`, `assert_ne!` and `debug_assert_ne!` macros
2020-10-19 19:50:12 +00:00
..
methods Merge commit '2f6439ae6a6803d030cceb3ee14c9150e91b328b' into clippyup 2020-10-09 12:45:29 +02:00
utils Auto merge of #6167 - ThibsG:IdenticalArgumentsAssertEq3574, r=ebroto 2020-10-19 19:50:12 +00:00
approx_const.rs
arithmetic.rs
as_conversions.rs
asm_syntax.rs Merge commit '2f6439ae6a6803d030cceb3ee14c9150e91b328b' into clippyup 2020-10-09 12:45:29 +02:00
assertions_on_constants.rs
assign_ops.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
async_yields_async.rs Merge commit '5034d47f721ff4c3a3ff2aca9ef2ef3e1d067f9f' into clippyup 2020-09-10 17:47:07 +02:00
atomic_ordering.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
attrs.rs Merge commit '2f6439ae6a6803d030cceb3ee14c9150e91b328b' into clippyup 2020-10-09 12:45:29 +02:00
await_holding_lock.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
bit_mask.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
blacklisted_name.rs
blocks_in_if_conditions.rs
booleans.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
bytecount.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
cargo_common_metadata.rs
checked_conversions.rs Merge commit '09bd400243ed6f7059fedc0c1623aae3792521d6' into clippyup 2020-08-11 17:50:45 +02:00
cognitive_complexity.rs
collapsible_if.rs
comparison_chain.rs
consts.rs allow refs in our constant handling 2020-10-09 21:37:50 +02:00
copies.rs Fix FP in same_functions_in_if_condition lint about condition as macro 2020-10-13 11:31:13 +02:00
copy_iterator.rs
create_dir.rs Merge commit '5034d47f721ff4c3a3ff2aca9ef2ef3e1d067f9f' into clippyup 2020-09-10 17:47:07 +02:00
dbg_macro.rs
default_trait_access.rs Merge commit '5034d47f721ff4c3a3ff2aca9ef2ef3e1d067f9f' into clippyup 2020-09-10 17:47:07 +02:00
deprecated_lints.rs Deprecate clippy lint 2020-10-02 11:34:14 -07:00
dereference.rs
derive.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
disallowed_method.rs Merge commit '2f6439ae6a6803d030cceb3ee14c9150e91b328b' into clippyup 2020-10-09 12:45:29 +02:00
doc.rs Add doc comment issue of #5834 to known problems of lint doc_markdown 2020-10-02 22:05:40 +02:00
double_comparison.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
double_parens.rs Merge commit '09bd400243ed6f7059fedc0c1623aae3792521d6' into clippyup 2020-08-11 17:50:45 +02:00
drop_forget_ref.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
duration_subsec.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
else_if_without_else.rs
empty_enum.rs
entry.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
enum_clike.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
enum_variants.rs Fully integrate token collection for additional AST structs 2020-09-10 17:58:14 -04:00
eq_op.rs Assert macro args extractor as a common function in higher 2020-10-17 11:54:25 +02:00
erasing_op.rs
escape.rs Merge commit '2f6439ae6a6803d030cceb3ee14c9150e91b328b' into clippyup 2020-10-09 12:45:29 +02:00
eta_reduction.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
eval_order_dependence.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
excessive_bools.rs
exit.rs
explicit_write.rs
fallible_impl_from.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
float_equality_without_abs.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
float_literal.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
floating_point_arithmetic.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
format.rs Preserve raw strs for: format!(s) to s.to_string() lint 2020-10-09 20:23:03 +02:00
formatting.rs
functions.rs Use lowercase in error messages 2020-10-11 22:28:55 +02:00
future_not_send.rs Run cargo dev fmt 2020-10-15 22:37:53 -07:00
get_last_with_len.rs
identity_op.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
if_let_mutex.rs
if_let_some_result.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
if_not_else.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
implicit_return.rs
implicit_saturating_sub.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
indexing_slicing.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
infinite_iter.rs clippy: support QPath::LangItem 2020-08-17 13:55:05 +01:00
inherent_impl.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
inherent_to_string.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
inline_fn_without_body.rs
int_plus_one.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
integer_division.rs
items_after_statements.rs
large_const_arrays.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
large_enum_variant.rs
large_stack_arrays.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
len_zero.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
let_if_seq.rs
let_underscore.rs
lib.rs manual-unwrap-or / pr remarks 2020-10-14 22:16:48 +02:00
lifetimes.rs Merge commit '2f6439ae6a6803d030cceb3ee14c9150e91b328b' into clippyup 2020-10-09 12:45:29 +02:00
literal_representation.rs Merge commit '2f6439ae6a6803d030cceb3ee14c9150e91b328b' into clippyup 2020-10-09 12:45:29 +02:00
loops.rs Merge remote-tracking branch 'upstream/master' into rustup 2020-10-17 21:55:46 +02:00
macro_use.rs Merge commit '2f6439ae6a6803d030cceb3ee14c9150e91b328b' into clippyup 2020-10-09 12:45:29 +02:00
main_recursion.rs
manual_async_fn.rs Merge commit '09bd400243ed6f7059fedc0c1623aae3792521d6' into clippyup 2020-08-11 17:50:45 +02:00
manual_non_exhaustive.rs Fully integrate token collection for additional AST structs 2020-09-10 17:58:14 -04:00
manual_strip.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
manual_unwrap_or.rs manual-unwrap-or / remove unwrap_or_else suggestion due to ownership issues 2020-10-14 22:52:07 +02:00
map_clone.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
map_err_ignore.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
map_identity.rs
map_unit_fn.rs Merge commit '5034d47f721ff4c3a3ff2aca9ef2ef3e1d067f9f' into clippyup 2020-09-10 17:47:07 +02:00
match_on_vec_items.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
matches.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
mem_discriminant.rs
mem_forget.rs
mem_replace.rs
minmax.rs Merge commit '09bd400243ed6f7059fedc0c1623aae3792521d6' into clippyup 2020-08-11 17:50:45 +02:00
misc_early.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
misc.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
missing_const_for_fn.rs Merge commit '2f6439ae6a6803d030cceb3ee14c9150e91b328b' into clippyup 2020-10-09 12:45:29 +02:00
missing_doc.rs
missing_inline.rs
modulo_arithmetic.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
multiple_crate_versions.rs
mut_key.rs Fix two ICEs caused by ty.is_{sized,freeze} 2020-10-10 14:04:14 +02:00
mut_mut.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
mut_reference.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
mutable_debug_assertion.rs Assert macro args extractor as a common function in higher 2020-10-17 11:54:25 +02:00
mutex_atomic.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
needless_arbitrary_self_type.rs Merge commit '2f6439ae6a6803d030cceb3ee14c9150e91b328b' into clippyup 2020-10-09 12:45:29 +02:00
needless_bool.rs Merge commit '09bd400243ed6f7059fedc0c1623aae3792521d6' into clippyup 2020-08-11 17:50:45 +02:00
needless_borrow.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
needless_borrowed_ref.rs
needless_continue.rs
needless_pass_by_value.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
needless_update.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
neg_cmp_op_on_partial_ord.rs Merge commit '09bd400243ed6f7059fedc0c1623aae3792521d6' into clippyup 2020-08-11 17:50:45 +02:00
neg_multiply.rs Merge commit '09bd400243ed6f7059fedc0c1623aae3792521d6' into clippyup 2020-08-11 17:50:45 +02:00
new_without_default.rs merge as_local_hir_id with local_def_id_to_hir_id 2020-08-13 16:55:16 +02:00
no_effect.rs
non_copy_const.rs Merge commit '2f6439ae6a6803d030cceb3ee14c9150e91b328b' into clippyup 2020-10-09 12:45:29 +02:00
non_expressive_names.rs
open_options.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
option_env_unwrap.rs
option_if_let_else.rs add lint less_concise_than_option_unwrap_or 2020-10-14 22:16:48 +02:00
overflow_check_conditional.rs Merge commit '09bd400243ed6f7059fedc0c1623aae3792521d6' into clippyup 2020-08-11 17:50:45 +02:00
panic_in_result_fn.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
panic_unimplemented.rs
partialeq_ne_impl.rs
path_buf_push_overwrite.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
pattern_type_mismatch.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
precedence.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
ptr_eq.rs fixup! New lint: Recommend using ptr::eq when possible 2020-10-07 17:11:11 +02:00
ptr_offset_with_cast.rs
ptr.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
question_mark.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
ranges.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
redundant_clone.rs clippy: (Body, DefId) -> Body 2020-10-04 16:07:03 -07:00
redundant_closure_call.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
redundant_field_names.rs
redundant_pub_crate.rs
redundant_static_lifetimes.rs Merge commit '09bd400243ed6f7059fedc0c1623aae3792521d6' into clippyup 2020-08-11 17:50:45 +02:00
reference.rs Merge commit '09bd400243ed6f7059fedc0c1623aae3792521d6' into clippyup 2020-08-11 17:50:45 +02:00
regex.rs Merge commit '2f6439ae6a6803d030cceb3ee14c9150e91b328b' into clippyup 2020-10-09 12:45:29 +02:00
repeat_once.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
returns.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
self_assignment.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
serde_api.rs
shadow.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
single_component_path_imports.rs Fully integrate token collection for additional AST structs 2020-09-10 17:58:14 -04:00
slow_vector_initialization.rs
stable_sort_primitive.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
strings.rs Merge commit '2f6439ae6a6803d030cceb3ee14c9150e91b328b' into clippyup 2020-10-09 12:45:29 +02:00
suspicious_trait_impl.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
swap.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
tabs_in_doc_comments.rs
temporary_assignment.rs Merge commit '5034d47f721ff4c3a3ff2aca9ef2ef3e1d067f9f' into clippyup 2020-09-10 17:47:07 +02:00
to_digit_is_some.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
to_string_in_display.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
trait_bounds.rs Merge commit '09bd400243ed6f7059fedc0c1623aae3792521d6' into clippyup 2020-08-11 17:50:45 +02:00
transmute.rs Add a known problem for transmute_ptr_to_ref lint 2020-10-14 23:15:01 +11:00
transmuting_null.rs rust_ast::ast => rustc_ast 2020-08-17 20:32:32 +00:00
trivially_copy_pass_by_ref.rs Run cargo dev fmt 2020-10-15 22:37:53 -07:00
try_err.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
types.rs Fix two ICEs caused by ty.is_{sized,freeze} 2020-10-10 14:04:14 +02:00
unicode.rs Merge commit '2f6439ae6a6803d030cceb3ee14c9150e91b328b' into clippyup 2020-10-09 12:45:29 +02:00
unit_return_expecting_ord.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
unnamed_address.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
unnecessary_sort_by.rs Merge commit '2f6439ae6a6803d030cceb3ee14c9150e91b328b' into clippyup 2020-10-09 12:45:29 +02:00
unnested_or_patterns.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
unsafe_removed_from_name.rs
unused_io_amount.rs clippy: support QPath::LangItem 2020-08-17 13:55:05 +01:00
unused_self.rs
unused_unit.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
unwrap_in_result.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
unwrap.rs Merge commit '09bd400243ed6f7059fedc0c1623aae3792521d6' into clippyup 2020-08-11 17:50:45 +02:00
use_self.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
useless_conversion.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
vec_resize_to_zero.rs rust_ast::ast => rustc_ast 2020-08-17 20:32:32 +00:00
vec.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
verbose_file_reads.rs
wildcard_dependencies.rs
wildcard_imports.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
write.rs Merge commit '2f6439ae6a6803d030cceb3ee14c9150e91b328b' into clippyup 2020-10-09 12:45:29 +02:00
zero_div_zero.rs