X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=CHANGELOG.md;h=461adb729f9b31ec97028e28bed1d463f3f7a987;hb=434f83a6c7e6973b12bd59918b059f5d35fe3075;hp=b773422b01507cd9130f316e165d4cb3a48fa799;hpb=410d5ba6c3bea86632247a559685c2e13dedea91;p=rust.git diff --git a/CHANGELOG.md b/CHANGELOG.md index b773422b015..461adb729f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,134 @@ All notable changes to this project will be documented in this file. ## Unreleased / In Rust Beta or Nightly -[b2601be...master](https://github.com/rust-lang/rust-clippy/compare/b2601be...master) +[01ab9fe6...master](https://github.com/rust-lang/rust-clippy/compare/01ab9fe6...master) + + +## Rust 1.36 + +Current beta + +[eb9f9b1...71be6f62](https://github.com/rust-lang/rust-clippy/compare/eb9f9b1...71be6f62) + + * New lints: [`find_map`], [`filter_map_next`] [#4039](https://github.com/rust-lang/rust-clippy/pull/4039) + * New lint: [`path_buf_push_overwrite`] [#3954](https://github.com/rust-lang/rust-clippy/pull/3954) + * Move `path_buf_push_overwrite` to the nursery [#4013](https://github.com/rust-lang/rust-clippy/pull/4013) + * Split [`redundant_closure`] into [`redundant_closure`] and [`redundant_closure_for_method_calls`] [#4110](https://github.com/rust-lang/rust-clippy/pull/4101) + * Allow allowing of [`toplevel_ref_arg`] lint [#4007](https://github.com/rust-lang/rust-clippy/pull/4007) + * Fix false negative in [`or_fun_call`] pertaining to nested constructors [#4084](https://github.com/rust-lang/rust-clippy/pull/4084) + * Fixed false positive in [`or_fn_call`] pertaining to enum variant constructors [#4018](https://github.com/rust-lang/rust-clippy/pull/4018) + * Fix false positive in [`useless_let_if_seq`] pertaining to interior mutability [#4035](https://github.com/rust-lang/rust-clippy/pull/4035) + * Fix false positive in [`redundant_closure`] pertaining to non-function types [#4008](https://github.com/rust-lang/rust-clippy/pull/4008) + * Fix false positive in [`let_and_return`] pertaining to attributes on `let`s [#4024](https://github.com/rust-lang/rust-clippy/pull/4024) + * Fix false positive in [`module_name_repetitions`] lint pertaining to attributes [#4006](https://github.com/rust-lang/rust-clippy/pull/4006) + * Fix false positive on [`assertions_on_constants`] pertaining to `debug_assert!` [#3989](https://github.com/rust-lang/rust-clippy/pull/3989) + * Improve suggestion in [`map_clone`] to suggest `.copied()` where applicable [#3970](https://github.com/rust-lang/rust-clippy/pull/3970) [#4043](https://github.com/rust-lang/rust-clippy/pull/4043) + * Improve suggestion for [`search_is_some`] [#4049](https://github.com/rust-lang/rust-clippy/pull/4049) + * Improve suggestion applicability for [`naive_bytecount`] [#3984](https://github.com/rust-lang/rust-clippy/pull/3984) + * Improve suggestion applicability for [`while_let_loop`] [#3975](https://github.com/rust-lang/rust-clippy/pull/3975) + * Improve diagnostics for [`too_many_arguments`] [#4053](https://github.com/rust-lang/rust-clippy/pull/4053) + * Improve diagnostics for [`cast_lossless`] [#4021](https://github.com/rust-lang/rust-clippy/pull/4021) + * Deal with macro checks in desugarings better [#4082](https://github.com/rust-lang/rust-clippy/pull/4082) + * Add macro check for [`unnecessary_cast`] [#4026](https://github.com/rust-lang/rust-clippy/pull/4026) + * Remove [`approx_constant`]'s documentation's "Known problems" section. [#4027](https://github.com/rust-lang/rust-clippy/pull/4027) + * Fix ICE in [`suspicious_else_formatting`] [#3960](https://github.com/rust-lang/rust-clippy/pull/3960) + * Fix ICE in [`decimal_literal_representation`] [#3931](https://github.com/rust-lang/rust-clippy/pull/3931) + + +## Rust 1.35 + +Current stable, released 2019-05-20 + +[1fac380..37f5c1e](https://github.com/rust-lang/rust-clippy/compare/1fac380...37f5c1e) + + * New lint: [`drop_bounds`] to detect `T: Drop` bounds + * Split [`redundant_closure`] into [`redundant_closure`] and [`redundant_closure_for_method_calls`] [#4110](https://github.com/rust-lang/rust-clippy/pull/4101) + * Rename `cyclomatic_complexity` to [`cognitive_complexity`], start work on making lint more practical for Rust code + * Move [`get_unwrap`] to the restriction category + * Improve suggestions for [`iter_cloned_collect`] + * Improve suggestions for [`cast_lossless`] to suggest suffixed literals + * Fix false positives in [`print_with_newline`] and [`write_with_newline`] pertaining to raw strings + * Fix false positive in [`needless_range_loop`] pertaining to structs without a `.iter()` + * Fix false positive in [`bool_comparison`] pertaining to non-bool types + * Fix false positive in [`redundant_closure`] pertaining to differences in borrows + * Fix false positive in [`option_map_unwrap_or`] on non-copy types + * Fix false positives in [`missing_const_for_fn`] pertaining to macros and trait method impls + * Fix false positive in [`needless_pass_by_value`] pertaining to procedural macros + * Fix false positive in [`needless_continue`] pertaining to loop labels + * Fix false positive for [`boxed_local`] pertaining to arguments moved into closures + * Fix false positive for [`use_self`] in nested functions + * Fix suggestion for [`expect_fun_call`] (https://github.com/rust-lang/rust-clippy/pull/3846) + * Fix suggestion for [`explicit_counter_loop`] to deal with parenthesizing range variables + * Fix suggestion for [`single_char_pattern`] to correctly escape single quotes + * Avoid triggering [`redundant_closure`] in macros + * ICE fixes: [#3805](https://github.com/rust-lang/rust-clippy/pull/3805), [#3772](https://github.com/rust-lang/rust-clippy/pull/3772), [#3741](https://github.com/rust-lang/rust-clippy/pull/3741) + +## Rust 1.34 + +Released 2019-04-10 + +[1b89724...1fac380](https://github.com/rust-lang/rust-clippy/compare/1b89724...1fac380) + +* New lint: [`assertions_on_constants`] to detect for example `assert!(true)` +* New lint: [`dbg_macro`] to detect uses of the `dbg!` macro +* New lint: [`missing_const_for_fn`] that can suggest functions to be made `const` +* New lint: [`too_many_lines`] to detect functions with excessive LOC. It can be + configured using the `too-many-lines-threshold` configuration. +* New lint: [`wildcard_enum_match_arm`] to check for wildcard enum matches using `_` +* Expand `redundant_closure` to also work for methods (not only functions) +* Fix ICEs in `vec_box`, `needless_pass_by_value` and `implicit_hasher` +* Fix false positive in `cast_sign_loss` +* Fix false positive in `integer_arithmetic` +* Fix false positive in `unit_arg` +* Fix false positives in `implicit_return` +* Add suggestion to `explicit_write` +* Improve suggestions for `question_mark` lint +* Fix incorrect suggestion for `cast_lossless` +* Fix incorrect suggestion for `expect_fun_call` +* Fix incorrect suggestion for `needless_bool` +* Fix incorrect suggestion for `needless_range_loop` +* Fix incorrect suggestion for `use_self` +* Fix incorrect suggestion for `while_let_on_iterator` +* Clippy is now slightly easier to invoke in non-cargo contexts. See + [#3665][pull3665] for more details. +* We now have [improved documentation][adding_lints] on how to add new lints + +## Rust 1.33 + +Released 2019-02-26 + +[b2601be...1b89724](https://github.com/rust-lang/rust-clippy/compare/b2601be...1b89724) + +* New lints: [`implicit_return`], [`vec_box`], [`cast_ref_to_mut`] +* The `rust-clippy` repository is now part of the `rust-lang` org. +* Rename `stutter` to `module_name_repetitions` +* Merge `new_without_default_derive` into `new_without_default` lint +* Move `large_digit_groups` from `style` group to `pedantic` +* Expand `bool_comparison` to check for `<`, `<=`, `>`, `>=`, and `!=` + comparisons against booleans +* Expand `no_effect` to detect writes to constants such as `A_CONST.field = 2` +* Expand `redundant_clone` to work on struct fields +* Expand `suspicious_else_formatting` to detect `if .. {..} {..}` +* Expand `use_self` to work on tuple structs and also in local macros +* Fix ICE in `result_map_unit_fn` and `option_map_unit_fn` +* Fix false positives in `implicit_return` +* Fix false positives in `use_self` +* Fix false negative in `clone_on_copy` +* Fix false positive in `doc_markdown` +* Fix false positive in `empty_loop` +* Fix false positive in `if_same_then_else` +* Fix false positive in `infinite_iter` +* Fix false positive in `question_mark` +* Fix false positive in `useless_asref` +* Fix false positive in `wildcard_dependencies` +* Fix false positive in `write_with_newline` +* Add suggestion to `explicit_write` +* Improve suggestions for `question_mark` lint +* Fix incorrect suggestion for `get_unwrap` + +## Rust 1.32 -## Rust 1.32 (2019-01-17) +Released 2019-01-17 [2e26fdc2...b2601be](https://github.com/rust-lang/rust-clippy/compare/2e26fdc2...b2601be) @@ -34,7 +159,9 @@ All notable changes to this project will be documented in this file. * Improve suggestion for `needless_range_loop` * Move `needless_pass_by_value` from `pedantic` group to `style` -## Rust 1.31 (2018-12-06) +## Rust 1.31 + +Released 2018-12-06 [125907ad..2e26fdc2](https://github.com/rust-lang/rust-clippy/compare/125907ad..2e26fdc2) @@ -72,7 +199,9 @@ All notable changes to this project will be documented in this file. * Improve suggestions for `manual_memcpy` * Improve help message for `needless_lifetimes` -## Rust 1.30 (2018-10-25) +## Rust 1.30 + +Released 2018-10-25 [14207503...125907ad](https://github.com/rust-lang/rust-clippy/compare/14207503...125907ad) @@ -101,7 +230,9 @@ All notable changes to this project will be documented in this file. * Move `shadow_unrelated` from `restriction` group to `pedantic` * Move `indexing_slicing` from `pedantic` group to `restriction` -## Rust 1.29 (2018-09-13) +## Rust 1.29 + +Released 2018-09-13 [v0.0.212...14207503](https://github.com/rust-lang/rust-clippy/compare/v0.0.212...14207503) @@ -732,6 +863,8 @@ All notable changes to this project will be documented in this file. [`AsMut`]: https://doc.rust-lang.org/std/convert/trait.AsMut.html [`AsRef`]: https://doc.rust-lang.org/std/convert/trait.AsRef.html [configuration file]: ./rust-clippy#configuration +[pull3665]: https://github.com/rust-lang/rust-clippy/pull/3665 +[adding_lints]: https://github.com/rust-lang/rust-clippy/blob/master/doc/adding_lints.md [`absurd_extreme_comparisons`]: https://rust-lang.github.io/rust-clippy/master/index.html#absurd_extreme_comparisons @@ -761,17 +894,18 @@ All notable changes to this project will be documented in this file. [`char_lit_as_u8`]: https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [`chars_last_cmp`]: https://rust-lang.github.io/rust-clippy/master/index.html#chars_last_cmp [`chars_next_cmp`]: https://rust-lang.github.io/rust-clippy/master/index.html#chars_next_cmp +[`checked_conversions`]: https://rust-lang.github.io/rust-clippy/master/index.html#checked_conversions [`clone_double_ref`]: https://rust-lang.github.io/rust-clippy/master/index.html#clone_double_ref [`clone_on_copy`]: https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [`clone_on_ref_ptr`]: https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_ref_ptr [`cmp_nan`]: https://rust-lang.github.io/rust-clippy/master/index.html#cmp_nan [`cmp_null`]: https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null [`cmp_owned`]: https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned +[`cognitive_complexity`]: https://rust-lang.github.io/rust-clippy/master/index.html#cognitive_complexity [`collapsible_if`]: https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if -[`const_static_lifetime`]: https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [`copy_iterator`]: https://rust-lang.github.io/rust-clippy/master/index.html#copy_iterator [`crosspointer_transmute`]: https://rust-lang.github.io/rust-clippy/master/index.html#crosspointer_transmute -[`cyclomatic_complexity`]: https://rust-lang.github.io/rust-clippy/master/index.html#cyclomatic_complexity +[`dbg_macro`]: https://rust-lang.github.io/rust-clippy/master/index.html#dbg_macro [`decimal_literal_representation`]: https://rust-lang.github.io/rust-clippy/master/index.html#decimal_literal_representation [`declare_interior_mutable_const`]: https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const [`default_trait_access`]: https://rust-lang.github.io/rust-clippy/master/index.html#default_trait_access @@ -784,6 +918,7 @@ All notable changes to this project will be documented in this file. [`double_comparisons`]: https://rust-lang.github.io/rust-clippy/master/index.html#double_comparisons [`double_neg`]: https://rust-lang.github.io/rust-clippy/master/index.html#double_neg [`double_parens`]: https://rust-lang.github.io/rust-clippy/master/index.html#double_parens +[`drop_bounds`]: https://rust-lang.github.io/rust-clippy/master/index.html#drop_bounds [`drop_copy`]: https://rust-lang.github.io/rust-clippy/master/index.html#drop_copy [`drop_ref`]: https://rust-lang.github.io/rust-clippy/master/index.html#drop_ref [`duplicate_underscore_argument`]: https://rust-lang.github.io/rust-clippy/master/index.html#duplicate_underscore_argument @@ -809,7 +944,9 @@ All notable changes to this project will be documented in this file. [`extra_unused_lifetimes`]: https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [`fallible_impl_from`]: https://rust-lang.github.io/rust-clippy/master/index.html#fallible_impl_from [`filter_map`]: https://rust-lang.github.io/rust-clippy/master/index.html#filter_map +[`filter_map_next`]: https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_next [`filter_next`]: https://rust-lang.github.io/rust-clippy/master/index.html#filter_next +[`find_map`]: https://rust-lang.github.io/rust-clippy/master/index.html#find_map [`float_arithmetic`]: https://rust-lang.github.io/rust-clippy/master/index.html#float_arithmetic [`float_cmp`]: https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp [`float_cmp_const`]: https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp_const @@ -820,6 +957,7 @@ All notable changes to this project will be documented in this file. [`for_loop_over_result`]: https://rust-lang.github.io/rust-clippy/master/index.html#for_loop_over_result [`forget_copy`]: https://rust-lang.github.io/rust-clippy/master/index.html#forget_copy [`forget_ref`]: https://rust-lang.github.io/rust-clippy/master/index.html#forget_ref +[`get_last_with_len`]: https://rust-lang.github.io/rust-clippy/master/index.html#get_last_with_len [`get_unwrap`]: https://rust-lang.github.io/rust-clippy/master/index.html#get_unwrap [`identity_conversion`]: https://rust-lang.github.io/rust-clippy/master/index.html#identity_conversion [`identity_op`]: https://rust-lang.github.io/rust-clippy/master/index.html#identity_op @@ -839,6 +977,7 @@ All notable changes to this project will be documented in this file. [`inline_fn_without_body`]: https://rust-lang.github.io/rust-clippy/master/index.html#inline_fn_without_body [`int_plus_one`]: https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [`integer_arithmetic`]: https://rust-lang.github.io/rust-clippy/master/index.html#integer_arithmetic +[`integer_division`]: https://rust-lang.github.io/rust-clippy/master/index.html#integer_division [`into_iter_on_array`]: https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_array [`into_iter_on_ref`]: https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [`invalid_ref`]: https://rust-lang.github.io/rust-clippy/master/index.html#invalid_ref @@ -878,6 +1017,7 @@ All notable changes to this project will be documented in this file. [`min_max`]: https://rust-lang.github.io/rust-clippy/master/index.html#min_max [`misaligned_transmute`]: https://rust-lang.github.io/rust-clippy/master/index.html#misaligned_transmute [`misrefactored_assign_op`]: https://rust-lang.github.io/rust-clippy/master/index.html#misrefactored_assign_op +[`missing_const_for_fn`]: https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_fn [`missing_docs_in_private_items`]: https://rust-lang.github.io/rust-clippy/master/index.html#missing_docs_in_private_items [`missing_inline_in_public_items`]: https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items [`mistyped_literal_suffixes`]: https://rust-lang.github.io/rust-clippy/master/index.html#mistyped_literal_suffixes @@ -927,6 +1067,7 @@ All notable changes to this project will be documented in this file. [`panic_params`]: https://rust-lang.github.io/rust-clippy/master/index.html#panic_params [`panicking_unwrap`]: https://rust-lang.github.io/rust-clippy/master/index.html#panicking_unwrap [`partialeq_ne_impl`]: https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl +[`path_buf_push_overwrite`]: https://rust-lang.github.io/rust-clippy/master/index.html#path_buf_push_overwrite [`possible_missing_comma`]: https://rust-lang.github.io/rust-clippy/master/index.html#possible_missing_comma [`precedence`]: https://rust-lang.github.io/rust-clippy/master/index.html#precedence [`print_literal`]: https://rust-lang.github.io/rust-clippy/master/index.html#print_literal @@ -944,9 +1085,11 @@ All notable changes to this project will be documented in this file. [`redundant_clone`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone [`redundant_closure`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [`redundant_closure_call`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call +[`redundant_closure_for_method_calls`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls [`redundant_field_names`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [`redundant_pattern`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern [`redundant_pattern_matching`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching +[`redundant_static_lifetimes`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [`ref_in_deref`]: https://rust-lang.github.io/rust-clippy/master/index.html#ref_in_deref [`regex_macro`]: https://rust-lang.github.io/rust-clippy/master/index.html#regex_macro [`replace_consts`]: https://rust-lang.github.io/rust-clippy/master/index.html#replace_consts @@ -980,6 +1123,7 @@ All notable changes to this project will be documented in this file. [`temporary_assignment`]: https://rust-lang.github.io/rust-clippy/master/index.html#temporary_assignment [`temporary_cstring_as_ptr`]: https://rust-lang.github.io/rust-clippy/master/index.html#temporary_cstring_as_ptr [`too_many_arguments`]: https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments +[`too_many_lines`]: https://rust-lang.github.io/rust-clippy/master/index.html#too_many_lines [`toplevel_ref_arg`]: https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg [`transmute_bytes_to_str`]: https://rust-lang.github.io/rust-clippy/master/index.html#transmute_bytes_to_str [`transmute_int_to_bool`]: https://rust-lang.github.io/rust-clippy/master/index.html#transmute_int_to_bool @@ -987,8 +1131,10 @@ All notable changes to this project will be documented in this file. [`transmute_int_to_float`]: https://rust-lang.github.io/rust-clippy/master/index.html#transmute_int_to_float [`transmute_ptr_to_ptr`]: https://rust-lang.github.io/rust-clippy/master/index.html#transmute_ptr_to_ptr [`transmute_ptr_to_ref`]: https://rust-lang.github.io/rust-clippy/master/index.html#transmute_ptr_to_ref +[`transmuting_null`]: https://rust-lang.github.io/rust-clippy/master/index.html#transmuting_null [`trivial_regex`]: https://rust-lang.github.io/rust-clippy/master/index.html#trivial_regex [`trivially_copy_pass_by_ref`]: https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref +[`try_err`]: https://rust-lang.github.io/rust-clippy/master/index.html#try_err [`type_complexity`]: https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [`unicode_not_nfc`]: https://rust-lang.github.io/rust-clippy/master/index.html#unicode_not_nfc [`unimplemented`]: https://rust-lang.github.io/rust-clippy/master/index.html#unimplemented @@ -1027,6 +1173,7 @@ All notable changes to this project will be documented in this file. [`while_let_loop`]: https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [`while_let_on_iterator`]: https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [`wildcard_dependencies`]: https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_dependencies +[`wildcard_enum_match_arm`]: https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_enum_match_arm [`write_literal`]: https://rust-lang.github.io/rust-clippy/master/index.html#write_literal [`write_with_newline`]: https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [`writeln_empty_string`]: https://rust-lang.github.io/rust-clippy/master/index.html#writeln_empty_string