All notable changes to this project will be documented in this file. See Changelog Update if you want to update this document.
Current beta, release 2021-03-25
upper_case_acronyms #6475from_over_into #6476case_sensitive_file_extension_comparisons #6500needless_question_mark #6507missing_panics_doc #6523redundant_slicing #6528vec_init_then_push #6538ptr_as_ptr #6542collapsible_else_if (split out from collapsible_if) #6544inspect_for_each #6577manual_filter_map #6591exhaustive_enums #6617exhaustive_structs #6617find_map with manual_find_map #6591unknown_clippy_lints Now integrated in the unknown_lints rustc lint #6653ptr_arg Now also suggests to use &Path instead of &PathBuf #6506cast_ptr_alignment Also lint when the pointer::cast method is used #6557collapsible_match Now also deals with & and * operators in the match scrutinee #6619similar_names Ignore underscore prefixed names #6403print_literal and write_literal No longer lint numeric literals #6408large_enum_variant No longer lints in external macros #6485empty_enum Only lint if never_type feature is enabled #6513field_reassign_with_default No longer lints in macros #6553size_of_in_element_count No longer lints when dividing by element size #6578needless_return No longer lints in macros #6586match_overlapping_arm No longer lint when first arm is completely included in second arm #6603doc_markdown Add WebGL to the default configuration as an allowed identifier #6605field_reassign_with_default Don't expand macro in lint suggestion #6531match_like_matches_macro Strip references in suggestion #6532single_match Suggest if over if let when possible #6574ref_in_deref Use parentheses correctly in suggestion #6609stable_sort_primitive Clarify error message #6611README.md by removing outdated paragraph #6488await_holding_refcell_ref and await_holding_lock #6585as_conversions #6608CLIPPY_TESTS=true was set somewhere #6575cargo dev-lintcheck tool to the Clippy Dev Tool #6469Current stable, released 2021-02-11
suspicious_operation_groupings #6086size_of_in_element_count #6394unnecessary_wraps #6070let_underscore_drop #6305collapsible_match #6402redundant_else #6330zero_sized_map_values #6218print_stderr #6367string_from_utf8_as_bytes #6134str_to_string and string_to_string have been un-deprecated as restriction lints #6333panic_params lint. This is now available in rustc as panic_fmt #6351map_err_ignore to restriction #6416await_holding_refcell_ref to pedantic #6354await_holding_lock to pedantic #6354unreadable-literal-lint-fractions configuration to disable the unreadable_literal lint for fractions #6421clone_on_copy: Now shows the type in the lint message #6443redundant_pattern_matching: Now also lints on std::task::Poll #6339redundant_pattern_matching: Additionally also lints on std::net::IpAddr #6377search_is_some: Now suggests contains instead of find(foo).is_some() #6119clone_double_ref: Now prints the reference type in the lint message #6442modulo_one: Now also lints on -1. #6360empty_loop: Now lints no_std crates, too #6205or_fun_call: Now also lints when indexing HashMap or BTreeMap #6267wrong_self_convention: Now also lints in trait definitions #6316needless_borrow: Print the type in the lint message #6449manual_range_contains: No longer lints in const fn #6382unnecessary_lazy_evaluations: No longer lints if closure argument is used #6370match_single_binding: Now ignores cases with #[cfg()] macros #6435match_like_matches_macro: No longer lints on arms with attributes #6290map_clone: No longer lints with deref and clone #6269map_clone: No longer lints in the case of &mut #6301needless_update: Now ignores non_exhaustive structs #6464needless_collect: No longer lints when a collect is needed multiple times #6313unnecessary_cast No longer lints cfg-dependent types #6369declare_interior_mutable_const and borrow_interior_mutable_const: Both now ignore enums with frozen variants #6110field_reassign_with_default No longer lint for private fields #6537vec_box: Provide correct type scope suggestion #6271manual_range_contains: Give correct suggestion when using floats #6320unnecessary_lazy_evaluations: Don't always mark suggestion as MachineApplicable #6272manual_async_fn: Improve suggestion formatting #6294unnecessary_cast: Fix incorrectly formatted float literal suggestion #6362from_iter_instead_of_collect #6304needless_doctest_main #6458missing-errors-doc and missing errors doc are now valid aliases for lint namescomparison_chain documentation #6390cargo_common_metadata #6293map_clone documentation #6340--no-deps option to avoid running on path dependencies in workspaces #6188Released 2020-12-31
field_reassign_with_default #5911await_holding_refcell_ref #6029disallowed_method #6081inline_asm_x86_att_syntax #6092inline_asm_x86_intel_syntax #6092from_iter_instead_of_collect #6101mut_mutex_lock #6103single_element_loop #6109manual_unwrap_or #6123large_types_passed_by_value #6135result_unit_err #6157ref_option_ref #6165manual_range_contains #6177unusual_byte_groupings #6183comparison_to_empty #6226map_collect_result_unit #6227manual_ok_or #6233single_char_push_str to single_char_add_str #6037zero_width_space to invisible_characters #6105drop_bounds (uplifted) #6111string_lit_as_bytes to nursery #6117rc_buffer to restriction #6128manual_memcpy: Also lint when there are loop counters (and produce a reliable suggestion) #5727single_char_add_str: Also lint on String::insert_str #6037invisible_characters: Also lint the characters \u{AD} and \u{2060} #6105eq_op: Also lint on the assert_*! macro family #6167items_after_statements: Also lint in local macro expansions #6176unnecessary_cast: Also lint casts on integer and float literals #6187manual_unwrap_or: Also lint Result::unwrap_or #6190match_like_matches_macro: Also lint when match has more than two arms #6216integer_arithmetic: Better handle / an % operators #6229needless_lifetimes: Bail out if the function has a where clause with the lifetime #5978explicit_counter_loop: No longer lints, when loop counter is used after it is incremented #6076or_fun_call: Revert changes addressing the handling of const fn #6077needless_range_loop: No longer lints, when the iterable is used in the range #6102inconsistent_digit_grouping: Fix bug when using floating point exponent #6104mistyped_literal_suffixes: No longer lints on the fractional part of a float (e.g. 713.32_64) #6114invalid_regex: No longer lint on unicode characters within bytes::Regex #6132boxed_local: No longer lints on extern fn arguments #6133needless_lifetimes: Fix regression, where lifetime is used in where clause #6198unnecessary_sort_by: Avoid dereferencing the suggested closure parameter #6078needless_arbitrary_self_type: Correctly handle expanded code #6093useless_format: Preserve raw strings in suggestion #6151empty_loop: Suggest alternatives #6162borrowed_box: Correctly add parentheses in suggestion #6200unused_unit: Improve suggestion formatting #6247doc_markdown: Document problematic link text style #6107Released 2020-11-19
self_assignment #5894unnecessary_lazy_evaluations #5720manual_strip #6038map_err_ignore #5998rc_buffer #6044to_string_in_display #5831single_char_push_str #5881verbose_bit_mask to pedantic #6036precedence to handle chains of methods combined with unary negation #5928useless_vec: add a configuration value for the maximum allowed size on the stack #5907suspicious_arithmetic_impl: extend to implementations of BitAnd, BitOr, BitXor, Rem, Shl, and Shr #5884invalid_atomic_ordering: detect misuse of compare_exchange, compare_exchange_weak, and fetch_update #6025redundant_pattern_matching triggering in macros #6069option_if_let_else: distinguish pure from impure else expressions #5937needless_doctest_main: parse doctests instead of using textual search #5912wildcard_imports: allow prelude to appear in any segment of an import #5929len_zero for ranges now that range_is_empty is stable #5961option_as_ref_deref: catch fully-qualified calls to Deref::deref and DerefMut::deref_mut #5933useless_attribute: permit allowing wildcard_imports and enum_glob_use #5994transmute_ptr_to_ptr: avoid suggesting dereferencing raw pointers in const contexts #5999redundant_closure_call: take into account usages of the closure in nested functions and closures #5920borrow_interior_mutable_const when referencing a field behind a pointer #5949doc_markdown: allow using “GraphQL” without backticks #5996to_string_in_display: avoid linting when calling to_string() on anything that is not self #5971indexing_slicing and out_of_bounds_indexing treat references to arrays as arrays #6034should_implement_trait: ignore methods with lifetime parameters #5725needless_return: avoid linting if a temporary borrows a local variable #5903unnecessary_sort_by to non-reference, Copy types #6006from_bits/to_bits in const contexts in transmute_int_to_float #5919declare_interior_mutable_const and borrow_interior_mutable_const: improve detection of interior mutable types #6046let_and_return: add a cast to the suggestion when the return expression has adjustments #5946useless_conversion: show the type in the error message #6035unnecessary_mut_passed: discriminate between functions and methods in the error message #5892float_cmp and float_cmp_const: change wording to make margin of error less ambiguous #6043default_trait_access: do not use unnecessary type parameters in the suggestion #5993collapsible_if: don't use expanded code in the suggestion #5992print_with_newline and write_with_newline #6042unit_arg: improve the readability of the suggestion #5931stable_sort_primitive: print the type that is being sorted in the lint message #5935too_many_lines lint message #6009useless_conversion where applicable #5900option_map_unit_fn and result_map_unit_fn: print the unit type () explicitly #6024redundant_allocation: suggest replacing Rc<Box<T>> with Rc<T> #5899repeat_once #5948mutable_key_type: explain potential for false positives when the interior mutable type is not accessed in the Hash implementation #6019unnecessary_mut_passed: fix typo #5913ptr_arg docs. #5885box_vec, vec_box and borrowed_box: add link to the documentation of Box #6023Released 2020-10-08
derive_ord_xor_partial_ord #5848trait_duplication_in_bounds #5852map_identity #5694unit_return_expecting_ord #5737pattern_type_mismatch #4841repeat_once #5773same_item_push #5825needless_arbitrary_self_type #5869match_like_matches_macro #5769stable_sort_primitive #5809blanket_clippy_restriction_lints #5750option_if_let_else #5301regex_macro lint #5760range_minus_one to pedantic #5752needless_collect by catching collect calls followed by iter or into_iter calls #5837panic, todo, unimplemented and unreachable now detect calls with formatting #5811suboptimal_flops and imprecise_flops #5443PartialEq in cmp_owned #5701unsafe_derive_deserialize #5870ord.min(a).max(b) where a < b in min_max #5871clone_on_copy suggestion machine applicable #5745len_zero on ranges now that is_empty is stable on them #5961or_fun_call with const fns that take no arguments #5889redundant_closure_call false positive for closures that have multiple calls #5800ManuallyDrop in redundant_clone #5824single_match_else #5771unnested_or_patterns if the feature or_patterns is not enabled #5758unnecessary_sort_by #5756Try impl for Poll when generating suggestions in try_err #5857manual_async_fn #5859type_repetition_in_bounds and add a configuration option #5761suspicious_arithmetic_impl lint to one binary operation #5820shadow_unrelated suggestion by truncating the RHS snippet #5788filter_map instead of flat_map when mapping to Option in map_flatten #5846iter_nth_zero #5793redundant_pattern_matching #5815iter_skip_next #5843collapsible_if fix suggestion #5732needless_collect #5877unnested_or_patterns #5784await_holding_lock documentation #5748Released 2020-08-27
cast_ptr_alignment to pedantic #5667mem_replace_with_uninit lint #5695len_zero: Avoid linting ranges when the range_is_empty feature is not enabled #5656let_and_return: Don't lint if a temporary borrow is involved #5680reversed_empty_ranges: Avoid linting N..N in for loop arguments in #5692if_same_then_else: Don't assume multiplication is always commutative #5702blacklisted_name: Remove bar from the default configuration #5712redundant_pattern_matching: Avoid suggesting non-const fn calls in const contexts #5724unit_arg lint, so that it suggest semantic equivalent code #4455macro_use_imports #5279consts module of Clippy #5709--rustc flag to clippy-driver, which turns clippy-driver into rustc and passes all the given arguments to rustc. This is especially useful for tools that need the rustc version Clippy was compiled with, instead of the Clippy version. E.g. clippy-driver --rustc --version will print the output of rustc --version. #5178Released 2020-07-16
match_wildcard_for_single_variants #5582unsafe_derive_deserialize #5493if_let_mutex #5332mismatched_target_os #5506await_holding_lock #5439match_on_vec_items #5522manual_async_fn #5576reversed_empty_ranges #5583manual_non_exhaustive #5550match_bool to pedantic #5408match_wild_err_arm to pedantic and update help messages. #5622useless_let_if_seq to nursery. #5599option_and_then_some and rename to bind_instead_of_map. #5529identity_conversion to useless_conversion. #5568block_in_if_condition_expr and block_in_if_condition_stmt into blocks_in_if_conditions. #5563option_map_unwrap_or, option_map_unwrap_or_else and result_map_unwrap_or_else into map_unwrap_or. #5563option_unwrap_used and result_unwrap_used into unwrap_used. #5563option_expect_used and result_expect_used into expect_used. #5563for_loop_over_option and for_loop_over_result into for_loops_over_fallibles. #5563useless_conversion with TryFrom and TryInto. #5631unused_unit. #5592Default in new_without_default. #5616while_let_on_iterator #5525empty_line_after_outer_attr #5609unnecessary_unwrap #5558comparison_chain #5596used_underscore_binding in await desugaring. #5535borrowed_box on mutable references. #54911 << 0 in identity_op. #5602use super::*; glob imports in wildcard_imports. #5564doc_markdown. #5611multiple_crate_versions. #5636allow attribute on arguments in ptr_arg. #5647redundant_field_names, just_underscores_and_digits, many_single_char_names and similar_names. #5651len in or_fun_call. #4429manual_memcpy. #5536redundant_pattern_matching for macros. #5511copied() for mutable references in map_clone. #5530clone_double_ref. #5547unnecessary_mut_passed. #5639unneeded_field_pattern. #5541Released 2020-06-04
explicit_deref_methods #5226implicit_saturating_sub #5427macro_use_imports #5230verbose_file_reads #5272future_not_send #5423redundant_pub_crate #5319large_const_arrays #5248result_map_or_into_option #5415redundant_allocation #5349fn_address_comparisons #5294vtable_address_comparisons #5294replace_consts lint #5380cognitive_complexity to nursery #5428useless_transmute to nursery #5364inefficient_to_string to pedantic #5412option_option to pedantic #5401unreadable_literal to pedantic #5419let_unit_value to pedantic #5409trivially_copy_pass_by_ref to pedantic #5410implicit_hasher to pedantic #5411cargo clippy --fix -Z unstable-options to auto-fix lints that support this #5363redundant_clone also trigger on cases where the cloned value is not consumed. #5304integer_arithmetic to also disallow bit-shifting #5430option_as_ref_deref now detects more deref cases #5425large_enum_variant now report the sizes of the largest and second-largest variants #5466bool_comparison now also checks for inequality comparisons that can be written more concisely #5365clone_on_copy to work in method call arguments as well #5441redundant_pattern_matching now also handles while let #5483integer_arithmetic now also lints references of integers #5329float_cmp_const to also work on arrays #5345map_flatten when map is called on an Option #5473many_single_char_names #5468should_implement_trait #5437unused_self #5387redundant_clone #5453precedence #5445suspicious_op_assign_impl #5424needless_lifetimes #5293redundant_pattern #5287inconsistent_digit_grouping #5451question_mark lint suggestion so that it doesn't add redundant as_ref() #5481option_map_unit_fn #5292match_single_binding when triggered inside a closure #5350new_ret_no_self #5448option_option now suggest using a tri-state enum #5403verbose_bit_mask documentation #5454wildcard_imports documentation now mentions that use ...::prelude::* is not linted #5312Released 2020-04-23
imprecise_flops #4897suboptimal_flops #4897wildcard_imports #5029single_component_path_imports #5058match_single_binding #5061let_underscore_lock #5101struct_excessive_bools #5125fn_params_excessive_bools #5125option_env_unwrap #5148lossy_float_literal #5202rest_pat_in_fully_bound_structs #5258unneeded_field_pattern to pedantic group #5200missing_errors_doc lint also trigger on async functions #5181approx_constant #5193question_mark lint #5266misc_early lints #5129missing_errors_doc #5213usizes #5256iter_nth_zeroReleased 2020-03-12
filetype_is_file #4543let_underscore_must_use #4823modulo_arithmetic #4867mem_replace_with_default #4881mutable_key_type #4885option_as_ref_deref #4945wildcard_in_or_patterns #4960iter_nth_zero #4966invalid_atomic_ordering #4999skip_while_next #5067transmute_float_to_int from nursery to complexity group #5015range_plus_one to pedantic group #5057debug_assert_with_mut_call to nursery group #5106unused_label #4930unused_io_amount #5027vec_box configurable by adding a size threshold #5081cmp_nan #4910expect_fun_call #4915redundant_clone #5017map_clone #4937replace_consts #4977let_and_return #5008eq_op #5079possible_missing_comma #5083debug_assert_with_mut_call #5106let_underscore_must_use in external macros #5082empty_loop in no_std crates #5086option_map_unwrap_or #4634wildcard_enum_match_arm #4934cognitive_complexity #4935decimal_literal_representation #4956unknown_clippy_lints #4963explicit_into_iter_loop #4978useless_attribute #5022if_let_some_result #5032empty_enum, replace_consts, redundant_clone, and iterator_step_by_zeroReleased 2020-01-30
use_self to nursery group #4863into_iter_on_array #4788string_lit_as_bytes to also trigger when literal has escapes #4808comparison_chain #4842while_immutable_condition #4730explicit_counter_loop #4803must_use_candidate #4794print_with_newline and write_with_newline #4769derive_hash_xor_eq #4766missing_inline_in_public_items #4870string_add #4880float_arithmetic #4851cast_sign_loss #4883manual_swap #4877use_self #4776const_generics #4780clippy-driver without arguments, instead of ICEing #4810Released 2019-12-19
unneeded_wildcard_pattern #4537needless_doctest_main #4603suspicious_unary_op_formatting #4615debug_assert_with_mut_call #4680unused_self #4619inefficient_to_string #4683must_use_unit #4560must_use_candidate #4560double_must_use #4560comparison_chain #4569unsound_collection_transmute #4592panic #4657unreachable #4657todo #4657option_expect_used #4657result_expect_used #4657redundant_clone to perf group #4509manual_mul_add to nursery group #4736unit_cmp to also work with assert_eq!, debug_assert_eq!, assert_ne! and debug_assert_ne! #4613integer_arithmetic to also detect mutating arithmetic like += #4585nonminimal_bool #4568missing_safety_doc #4611cast_sign_loss #4614redundant_clone #4509try_err #4721toplevel_ref_arg #4570multiple_inherent_impl #4593cargo fix --clippy #4575zero_ptr #4599explicit_counter_loop #4691mul_add #4602assertions_on_constants #4635use_self #4671Released 2019-11-07
unused_collect lint. This is fully covered by rustc's #[must_use] on collect #4348type_repetition_in_bounds to pedantic group #4403cast_lossless to pedantic group #4539temporary_cstring_as_ptr now catches more cases #4425use_self now works in constructors, too #4525cargo_common_metadata now checks for license files #4518cognitive_complexity now includes the measured complexity in the warning message #4469block_in_if_* lints #4458cast_lossless #4473clone_on_copy #4411deref_addrof #4487too_many_lines #4490new_ret_no_self #4365manual_swap #4478missing_const_for_fn #4450extra_unused_lifetimes #4477inherent_to_string #4460map_entry #4495unused_unit #4445redundant_pattern #4489wrong_self_convention #4369cargo fix --clippy #4558redundant_pattern_matching #4352explicit_write #4544or_fun_call #4522match_as_ref #4446unnecessary_fold_span #4382unseparated_literal_suffix #4401char_lit_as_u8 #4418Released 2019-09-26
{unnnecessary,panicking}_unwrap out of nursery #4307use_self lint to suggest uses of Self::Variant #4308let_unit #4337pub_enum_variant_names and enum_variant_names #4345cast_ptr_alignment #4257string_lit_as_bytes #4233needless_lifetimes #4266float_cmp #4275needless_return #4274match_same_arms #4246needless_bool #4335cast_ptr_alignment #4257single_char_literal #4361len_zero #4314implicit_hasher #4268trivially_copy_pass_by_ref #4250Released 2019-08-15
const_static_lifetime is now called redundant_static_lifetimes. The lint now covers statics in addition to consts #4162match_same_arms now warns for all identical arms, instead of only the first one #4102needless_return now works with void functions #4220redundant_closure #4190useless_attribute #4107float_cmp #4214print_with_newline and write_with_newline #4136option_map_unwrap_or_else and result_map_unwrap_or_else #4164non_ascii_literal #4119let_and_return #4137trivially_copy_pass_by_ref #4071unreadable_literal #4099Released 2019-07-04
find_map, filter_map_next #4039path_buf_push_overwrite #3954path_buf_push_overwrite to the nursery #4013redundant_closure into redundant_closure and redundant_closure_for_method_calls #4110toplevel_ref_arg lint #4007or_fun_call pertaining to nested constructors #4084or_fun_call pertaining to enum variant constructors #4018useless_let_if_seq pertaining to interior mutability #4035redundant_closure pertaining to non-function types #4008let_and_return pertaining to attributes on lets #4024module_name_repetitions lint pertaining to attributes #4006assertions_on_constants pertaining to debug_assert! #3989map_clone to suggest .copied() where applicable #3970 #4043search_is_some #4049naive_bytecount #3984while_let_loop #3975too_many_arguments #4053cast_lossless #4021unnecessary_cast #4026approx_constant‘s documentation’s “Known problems” section. #4027suspicious_else_formatting #3960decimal_literal_representation #3931Released 2019-05-20
drop_bounds to detect T: Drop boundsredundant_closure into redundant_closure and redundant_closure_for_method_calls #4110cyclomatic_complexity to cognitive_complexity, start work on making lint more practical for Rust codeget_unwrap to the restriction categoryiter_cloned_collectcast_lossless to suggest suffixed literalsprint_with_newline and write_with_newline pertaining to raw stringsneedless_range_loop pertaining to structs without a .iter()bool_comparison pertaining to non-bool typesredundant_closure pertaining to differences in borrowsoption_map_unwrap_or on non-copy typesmissing_const_for_fn pertaining to macros and trait method implsneedless_pass_by_value pertaining to procedural macrosneedless_continue pertaining to loop labelsboxed_local pertaining to arguments moved into closuresuse_self in nested functionsexpect_fun_call (https://github.com/rust-lang/rust-clippy/pull/3846)explicit_counter_loop to deal with parenthesizing range variablessingle_char_pattern to correctly escape single quotesredundant_closure in macrosReleased 2019-04-10
assertions_on_constants to detect for example assert!(true)dbg_macro to detect uses of the dbg! macromissing_const_for_fn that can suggest functions to be made consttoo_many_lines to detect functions with excessive LOC. It can be configured using the too-many-lines-threshold configuration.wildcard_enum_match_arm to check for wildcard enum matches using _redundant_closure to also work for methods (not only functions)vec_box, needless_pass_by_value and implicit_hashercast_sign_lossinteger_arithmeticunit_argimplicit_returnexplicit_writequestion_mark lintcast_losslessexpect_fun_callneedless_boolneedless_range_loopuse_selfwhile_let_on_iteratorReleased 2019-02-26
implicit_return, vec_box, cast_ref_to_mutrust-clippy repository is now part of the rust-lang org.stutter to module_name_repetitionsnew_without_default_derive into new_without_default lintlarge_digit_groups from style group to pedanticbool_comparison to check for <, <=, >, >=, and != comparisons against booleansno_effect to detect writes to constants such as A_CONST.field = 2redundant_clone to work on struct fieldssuspicious_else_formatting to detect if .. {..} {..}use_self to work on tuple structs and also in local macrosresult_map_unit_fn and option_map_unit_fnimplicit_returnuse_selfclone_on_copydoc_markdownempty_loopif_same_then_elseinfinite_iterquestion_markuseless_asrefwildcard_dependencieswrite_with_newlineexplicit_writequestion_mark lintget_unwrapReleased 2019-01-17
slow_vector_initialization, mem_discriminant_non_enum, redundant_clone, wildcard_dependencies, into_iter_on_ref, into_iter_on_array, deprecated_cfg_attr, mem_discriminant_non_enum, cargo_common_metadatau128 and i128 to integer related lintsmistyped_literal_suffixesuse_selfmissing_commanew_ret_no_selfpossible_missing_commainteger_arithmetic in constant itemsneedless_borrowout_of_bounds_indexingnew_without_default_derivestring_lit_as_bytesout_of_bounds_indexinguse_self. It will now also check existential typesredundant_closure_callbool_comparison triggering 3 times on on on the same codetrivially_copy_pass_by_ref to work on trait methodsneedless_range_loopneedless_pass_by_value from pedantic group to styleReleased 2018-12-06
rustup component add clippy.redundant_pattern_matching, unnecessary_filter_map, unused_unit, map_flatten, mem_replace_option_with_noneif_let_redundant_pattern_matchingneedless_pass_by_value when encountering a generic function argument with a lifetime parameterneedless_range_loopsingle_char_pattern when encountering a constant valueassign_op_patternboxed_local on trait implementationscmp_ownedcollapsible_if when conditionals have commentsdouble_parensexcessive_precisionexplicit_counter_loopfn_to_numeric_cast_with_truncationmap_clonenew_ret_no_selfnew_without_default when new is unsafetype_complexity when using extern typesuseless_formatwrong_self_conventionexcessive_precisionexpect_fun_callget_unwrapuseless_formatfn_to_numeric_cast_with_truncation lint can be disabled againmanual_memcpyneedless_lifetimesReleased 2018-10-25
assign_ops lintmistyped_literal_suffixes, ptr_offset_with_cast, needless_collect, copy_iteratorcargo clippy -V now includes the Clippy commit hash of the Rust Clippy componentimplicit_hasherprintln!("{}" a);default_trait_accesstrivially_copy_pass_by_refsimilar_namesredundant_field_nameexpect_fun_callidentity_conversionexplicit_counter_looprange_plus_one suggestion and false negativeprint_with_newline / write_with_newline: don't warn about string with several \ns in themuseless_attribute to also whitelist unused_extern_cratessingle_char_patternidentity_conversion lintexplicit_iter_loop and explicit_into_iter_loop from style group to pedanticrange_plus_one and range_minus_one from nursery group to complexityshadow_unrelated from restriction group to pedanticindexing_slicing from pedantic group to restrictionReleased 2018-09-13
rustup component add clippy-preview and then cargo clippy to run Clippy. This should put an end to the continuous nightly upgrades for Clippy users.while let (..) = x.iter() constructuse_selftrivially_copy_pass_by_refuseless_attribute lintprint_literaluse_self regressionsneg_cmp_op_on_partial_ordsingle_char_patternunused_lifetimes to extra_unused_lifetimes because of naming conflict with new rustc lintclippy::cyclomatic_complexity instead of clippy(cyclomatic_complexity)cast_ptr_alignment, transmute_ptr_to_ptr, write_literal, write_with_newline, writeln_empty_stringprint_literalwhile_immutable_conditionredundant_field_names, suspicious_arithmetic_impl, suspicious_op_assign_implquestion_markdouble_comparisons, empty_line_after_outer_attrmisaligned_transmutedecimal_literal_representationelse_if_without_else, option_option, unit_arg, unnecessary_foldunit_exprneedless_pass_by_valuematch_as_refjust_underscores_and_digits, result_map_unwrap_or_else, transmute_bytes_to_strconst_static_lifetime, erasing_op, fallible_impl_from, println_empty_string, useless_asrefexplicit_write, identity_conversion, implicit_hasher, invalid_ref, option_map_or_none, range_minus_one, range_plus_one, transmute_int_to_bool, transmute_int_to_char, transmute_int_to_floatmut_range_boundint_plus_onechars_last_cmpneedless_borrow, ptr_arg,clone_on_ref_ptrmanual_memcpycast_lossless no longer has redundant parentheses in its suggestionsunit_exprinfinite_iter, maybe_infinite_iter, cast_losslessuse_self triggering inside derivescargo clippy --allnaive_bytecountuse_selfunreadable_literal, inconsistent_digit_grouping, large_digit_groupsinline_alwayspanic_paramscargo clippy crashing on dylib projectsnested_while_let and never_loopdoc_markdown lint.range_step_by_zeroiterator_step_by_zeroneedless_borrowed_referenceAsRef/AsMut arguments in wrong_self_conventionneedless_continueop_refcargo clippy on 64 bit windows systemszero_ptr, never_loop, mut_from_reflarge_enum_variantexplicit_into_iter_loop provides suggestionsCargo.toml&&mut by &reffor (_, x) in &mut hash_map -> for x in hash_map.values_mut()unused_io_amount, forget_ref, short_circuit_statementwrong_self_conventionderef_addrof, double_parens, pub_enum_variant_namesnew_without_defaultabsurd_extreme_comparisonsstring_extend_charsget_unwrap--sysroot, which broke cargo clippycargo clippy defines a cargo-clippy feature. This was previously added for a short time under the name clippy but removed for compatibility.cargo clippy --help is more helping (and less helpful :smile:)if_let_redundant_pattern_matching, partialeq_ne_impliter_skip_nextoption_map_unwrap_or and option_map_unwrap_or_else are now allowed by default.explicit_into_iter_loopclippy lint groups: filter_next, for_loop_over_option, for_loop_over_result and match_overlapping_arm. You should now be able to #[allow/deny] them individually and they are available directly through cargo clippy.builtin_type_shadowzero_prefixed_literal and 0b/0omissing_docs_in_private_items, zero_prefixed_literaluseless_attributeuseless_attribute ignores unused_imports on use statementsprint_with_newline, useless_attributemodule_inceptioneval_order_dependence, mixed_case_hex_literals, unseparated_literal_suffixtoo_many_argumentsneedless_borrowclone_on_copywrong_self_conventionmisrefactored_assign_op, serde_api_misusewrong_transmute, double_neg, filter_mapcargo clippy does not defines the clippy feature introduced in 0.0.76 anymorecollapsible_if now considers if letstutter and iter_nthcargo clippy now automatically defines the clippy featurenot_unsafe_ptr_arg_derefcargo-clippy JSON parsingCLIPPY_DISABLE_DOCS_LINKS environment variable to deactivate the “for further information visit lint-link” message.useless_let_if_sequseless_let_if_sequseless_let_if_seqinvalid_regex and trivial_regex can now warn on RegexSet::new, RegexBuilder::new and byte regexesused_underscore_binding has been made Allow temporarilyunnecessary_operationcargo clippy subcommandassign_op_pattern, assign_ops, needless_borrowfloat_arithmetic, integer_arithmetictemporary_cstring_as_ptr, unsafe_removed_from_name, and mem_forgetinvalid_upcast_comparisonslogic_bug, nonminimal_boolmatch_same_arms now ignores arms with guardsuseless_vec now warns on for … in vec![…]doc_markdownstr_to_string, string_to_string, unstable_as_slice, unstable_as_mut_slicecrosspointer_transmutemany_single_char_names and similar_namesstr to types considered by len_zeroindexing_slicingoverflow_check_conditional, unused_label, new_without_defaultneedless_range_loop with globalsredundant_closure_call