mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 21:53:23 +00:00
142 KiB
142 KiB
Changelog
All notable changes to this project will be documented in this file. See Changelog Update if you want to update this document.
Unreleased / In Rust Nightly
Rust 1.51
Current beta, release 2021-03-25
New Lints
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 fromcollapsible_if
) #6544inspect_for_each
#6577manual_filter_map
#6591exhaustive_enums
#6617exhaustive_structs
#6617
Moves and Deprecations
- Replace
find_map
withmanual_find_map
#6591 unknown_clippy_lints
Now integrated in theunknown_lints
rustc lint #6653
Enhancements
ptr_arg
Now also suggests to use&Path
instead of&PathBuf
#6506cast_ptr_alignment
Also lint when thepointer::cast
method is used #6557collapsible_match
Now also deals with&
and*
operators in thematch
scrutinee #6619
False Positive Fixes
similar_names
Ignore underscore prefixed names #6403print_literal
andwrite_literal
No longer lint numeric literals #6408large_enum_variant
No longer lints in external macros #6485empty_enum
Only lint ifnever_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
AddWebGL
to the default configuration as an allowed identifier #6605
Suggestion Fixes/Improvements
field_reassign_with_default
Don't expand macro in lint suggestion #6531match_like_matches_macro
Strip references in suggestion #6532single_match
Suggestif
overif let
when possible #6574ref_in_deref
Use parentheses correctly in suggestion #6609stable_sort_primitive
Clarify error message #6611
ICE Fixes
Documentation Improvements
- Improve search performance on the Clippy website and make it possible to directly search for lints on the GitHub issue tracker #6483
- Clean up
README.md
by removing outdated paragraph #6488 await_holding_refcell_ref
andawait_holding_lock
#6585as_conversions
#6608
Others
- Clippy now has a Roadmap for 2021. If you like to get involved in a bigger project, take a look at the Roadmap project page. All issues listed there are actively mentored #6462
- The Clippy version number now corresponds to the Rust version number #6526
- Fix oversight which caused Clippy to lint deps in some environments, where
CLIPPY_TESTS=true
was set somewhere #6575 - Add
cargo dev-lintcheck
tool to the Clippy Dev Tool #6469
Rust 1.50
Current stable, released 2021-02-11
New Lints
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
#6134
Moves and Deprecations
- Previously deprecated
str_to_string
andstring_to_string
have been un-deprecated asrestriction
lints #6333 - Deprecate
panic_params
lint. This is now available in rustc aspanic_fmt
#6351 - Move
map_err_ignore
torestriction
#6416 - Move
await_holding_refcell_ref
topedantic
#6354 - Move
await_holding_lock
topedantic
#6354
Enhancements
- Add the
unreadable-literal-lint-fractions
configuration to disable theunreadable_literal
lint for fractions #6421 clone_on_copy
: Now shows the type in the lint message #6443redundant_pattern_matching
: Now also lints onstd::task::Poll
#6339redundant_pattern_matching
: Additionally also lints onstd::net::IpAddr
#6377search_is_some
: Now suggestscontains
instead offind(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 indexingHashMap
orBTreeMap
#6267wrong_self_convention
: Now also lints in trait definitions #6316needless_borrow
: Print the type in the lint message #6449
False Positive Fixes
manual_range_contains
: No longer lints inconst 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 ignoresnon_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
andborrow_interior_mutable_const
: Both now ignore enums with frozen variants #6110field_reassign_with_default
No longer lint for private fields #6537
Suggestion Fixes/Improvements
vec_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 #6362
ICE Fixes
- Fix a crash in
from_iter_instead_of_collect
#6304 - Fix a silent crash when parsing doc comments in
needless_doctest_main
#6458
Documentation Improvements
- The lint website search has been improved (#6477):
- Searching for lints with dashes and spaces is possible now. For example
missing-errors-doc
andmissing errors doc
are now valid aliases for lint names - Improved fuzzy search in lint descriptions
- Searching for lints with dashes and spaces is possible now. For example
- Various README improvements #6287
- Add known problems to
comparison_chain
documentation #6390 - Fix example used in
cargo_common_metadata
#6293 - Improve
map_clone
documentation #6340
Others
- You can now tell Clippy about the MSRV your project supports. Please refer to the specific README section to learn more about MSRV support here #6201
- Add
--no-deps
option to avoid running on path dependencies in workspaces #6188
Rust 1.49
Released 2020-12-31
New Lints
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
#6233
Moves and Deprecations
- Rename
single_char_push_str
tosingle_char_add_str
#6037 - Rename
zero_width_space
toinvisible_characters
#6105 - Deprecate
drop_bounds
(uplifted) #6111 - Move
string_lit_as_bytes
tonursery
#6117 - Move
rc_buffer
torestriction
#6128
Enhancements
manual_memcpy
: Also lint when there are loop counters (and produce a reliable suggestion) #5727single_char_add_str
: Also lint onString::insert_str
#6037invisible_characters
: Also lint the characters\u{AD}
and\u{2060}
#6105eq_op
: Also lint on theassert_*!
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 lintResult::unwrap_or
#6190match_like_matches_macro
: Also lint whenmatch
has more than two arms #6216integer_arithmetic
: Better handle/
an%
operators #6229
False Positive Fixes
needless_lifetimes
: Bail out if the function has awhere
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 ofconst 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 withinbytes::Regex
#6132boxed_local
: No longer lints onextern fn
arguments #6133needless_lifetimes
: Fix regression, where lifetime is used inwhere
clause #6198
Suggestion Fixes/Improvements
unnecessary_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 #6247
Documentation Improvements
- Some doc improvements:
doc_markdown
: Document problematic link text style #6107
Rust 1.48
Released 2020-11-19
New lints
self_assignment
#5894unnecessary_lazy_evaluations
#5720manual_strip
#6038map_err_ignore
#5998rc_buffer
#6044to_string_in_display
#5831single_char_push_str
#5881
Moves and Deprecations
- Downgrade
verbose_bit_mask
to pedantic #6036
Enhancements
- Extend
precedence
to handle chains of methods combined with unary negation #5928 useless_vec
: add a configuration value for the maximum allowed size on the stack #5907suspicious_arithmetic_impl
: extend to implementations ofBitAnd
,BitOr
,BitXor
,Rem
,Shl
, andShr
#5884invalid_atomic_ordering
: detect misuse ofcompare_exchange
,compare_exchange_weak
, andfetch_update
#6025- Avoid
redundant_pattern_matching
triggering in macros #6069 option_if_let_else
: distinguish pure from impureelse
expressions #5937needless_doctest_main
: parse doctests instead of using textual search #5912wildcard_imports
: allowprelude
to appear in any segment of an import #5929- Re-enable
len_zero
for ranges now thatrange_is_empty
is stable #5961 option_as_ref_deref
: catch fully-qualified calls toDeref::deref
andDerefMut::deref_mut
#5933
False Positive Fixes
useless_attribute
: permit allowingwildcard_imports
andenum_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 #5920- Fix false positive in
borrow_interior_mutable_const
when referencing a field behind a pointer #5949 doc_markdown
: allow using "GraphQL" without backticks #5996to_string_in_display
: avoid linting when callingto_string()
on anything that is notself
#5971indexing_slicing
andout_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 #5903- Restrict
unnecessary_sort_by
to non-reference, Copy types #6006 - Avoid suggesting
from_bits
/to_bits
in const contexts intransmute_int_to_float
#5919 declare_interior_mutable_const
andborrow_interior_mutable_const
: improve detection of interior mutable types #6046
Suggestion Fixes/Improvements
let_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
andfloat_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 #5992- Do not suggest empty format strings in
print_with_newline
andwrite_with_newline
#6042 unit_arg
: improve the readability of the suggestion #5931stable_sort_primitive
: print the type that is being sorted in the lint message #5935- Show line count and max lines in
too_many_lines
lint message #6009 - Keep parentheses in the suggestion of
useless_conversion
where applicable #5900 option_map_unit_fn
andresult_map_unit_fn
: print the unit type()
explicitly #6024redundant_allocation
: suggest replacingRc<Box<T>>
withRc<T>
#5899- Make lint messages adhere to rustc dev guide conventions #5893
ICE Fixes
- Fix ICE in
repeat_once
#5948
Documentation Improvements
mutable_key_type
: explain potential for false positives when the interior mutable type is not accessed in theHash
implementation #6019unnecessary_mut_passed
: fix typo #5913- Add example of false positive to
ptr_arg
docs. #5885 box_vec
,vec_box
andborrowed_box
: add link to the documentation ofBox
#6023
Rust 1.47
Released 2020-10-08
New lints
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
#5301
Moves and Deprecations
- Deprecate
regex_macro
lint #5760 - Move
range_minus_one
topedantic
#5752
Enhancements
- Improve
needless_collect
by catchingcollect
calls followed byiter
orinto_iter
calls #5837 panic
,todo
,unimplemented
andunreachable
now detect calls with formatting #5811- Detect more cases of
suboptimal_flops
andimprecise_flops
#5443 - Handle asymmetrical implementations of
PartialEq
incmp_owned
#5701 - Make it possible to allow
unsafe_derive_deserialize
#5870 - Catch
ord.min(a).max(b)
where a < b inmin_max
#5871 - Make
clone_on_copy
suggestion machine applicable #5745 - Enable
len_zero
on ranges now thatis_empty
is stable on them #5961
False Positive Fixes
- Avoid triggering
or_fun_call
with const fns that take no arguments #5889 - Fix
redundant_closure_call
false positive for closures that have multiple calls #5800 - Don't lint cases involving
ManuallyDrop
inredundant_clone
#5824 - Treat a single expression the same as a single statement in the 2nd arm of a match in
single_match_else
#5771 - Don't trigger
unnested_or_patterns
if the featureor_patterns
is not enabled #5758 - Avoid linting if key borrows in
unnecessary_sort_by
#5756 - Consider
Try
impl forPoll
when generating suggestions intry_err
#5857 - Take input lifetimes into account in
manual_async_fn
#5859 - Fix multiple false positives in
type_repetition_in_bounds
and add a configuration option #5761 - Limit the
suspicious_arithmetic_impl
lint to one binary operation #5820
Suggestion Fixes/Improvements
- Improve readability of
shadow_unrelated
suggestion by truncating the RHS snippet #5788 - Suggest
filter_map
instead offlat_map
when mapping toOption
inmap_flatten
#5846 - Ensure suggestion is shown correctly for long method call chains in
iter_nth_zero
#5793 - Drop borrow operator in suggestions of
redundant_pattern_matching
#5815 - Add suggestion for
iter_skip_next
#5843 - Improve
collapsible_if
fix suggestion #5732
ICE Fixes
- Fix ICE caused by
needless_collect
#5877 - Fix ICE caused by
unnested_or_patterns
#5784
Documentation Improvements
- Fix grammar of
await_holding_lock
documentation #5748
Others
- Make lints adhere to the rustc dev guide #5888
Rust 1.46
Released 2020-08-27
New lints
Moves and Deprecations
- Move
cast_ptr_alignment
to pedantic #5667
Enhancements
- Improve
mem_replace_with_uninit
lint #5695
False Positive Fixes
len_zero
: Avoid linting ranges when therange_is_empty
feature is not enabled #5656let_and_return
: Don't lint if a temporary borrow is involved #5680reversed_empty_ranges
: Avoid lintingN..N
in for loop arguments in #5692if_same_then_else
: Don't assume multiplication is always commutative #5702blacklisted_name
: Removebar
from the default configuration #5712redundant_pattern_matching
: Avoid suggesting non-const fn
calls in const contexts #5724
Suggestion Fixes/Improvements
- Fix suggestion of
unit_arg
lint, so that it suggest semantic equivalent code #4455 - Add auto applicable suggestion to
macro_use_imports
#5279
ICE Fixes
- Fix ICE in the
consts
module of Clippy #5709
Documentation Improvements
- Improve code examples across multiple lints #5664
Others
- Introduce a
--rustc
flag toclippy-driver
, which turnsclippy-driver
intorustc
and passes all the given arguments torustc
. This is especially useful for tools that need therustc
version Clippy was compiled with, instead of the Clippy version. E.g.clippy-driver --rustc --version
will print the output ofrustc --version
. #5178 - New issue templates now make it easier to complain if Clippy is too annoying or not annoying enough! #5735
Rust 1.45
Released 2020-07-16
New lints
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
#5550
Moves and Deprecations
- Downgrade
match_bool
to pedantic #5408 - Downgrade
match_wild_err_arm
to pedantic and update help messages. #5622 - Downgrade
useless_let_if_seq
to nursery. #5599 - Generalize
option_and_then_some
and rename tobind_instead_of_map
. #5529 - Rename
identity_conversion
touseless_conversion
. #5568 - Merge
block_in_if_condition_expr
andblock_in_if_condition_stmt
intoblocks_in_if_conditions
. #5563 - Merge
option_map_unwrap_or
,option_map_unwrap_or_else
andresult_map_unwrap_or_else
intomap_unwrap_or
. #5563 - Merge
option_unwrap_used
andresult_unwrap_used
intounwrap_used
. #5563 - Merge
option_expect_used
andresult_expect_used
intoexpect_used
. #5563 - Merge
for_loop_over_option
andfor_loop_over_result
intofor_loops_over_fallibles
. #5563
Enhancements
- Avoid running cargo lints when not enabled to improve performance. #5505
- Extend
useless_conversion
withTryFrom
andTryInto
. #5631 - Lint also in type parameters and where clauses in
unused_unit
. #5592 - Do not suggest deriving
Default
innew_without_default
. #5616
False Positive Fixes
while_let_on_iterator
#5525empty_line_after_outer_attr
#5609unnecessary_unwrap
#5558comparison_chain
#5596- Don't trigger
used_underscore_binding
in await desugaring. #5535 - Don't trigger
borrowed_box
on mutable references. #5491 - Allow
1 << 0
inidentity_op
. #5602 - Allow
use super::*;
glob imports inwildcard_imports
. #5564 - Whitelist more words in
doc_markdown
. #5611 - Skip dev and build deps in
multiple_crate_versions
. #5636 - Honor
allow
attribute on arguments inptr_arg
. #5647 - Honor lint level attributes for
redundant_field_names
,just_underscores_and_digits
,many_single_char_names
andsimilar_names
. #5651 - Ignore calls to
len
inor_fun_call
. #4429
Suggestion Improvements
- Simplify suggestions in
manual_memcpy
. #5536 - Fix suggestion in
redundant_pattern_matching
for macros. #5511 - Avoid suggesting
copied()
for mutable references inmap_clone
. #5530 - Improve help message for
clone_double_ref
. #5547
ICE Fixes
- Fix ICE caused in unwrap module. #5590
- Fix ICE on rustc test issue-69020-assoc-const-arith-overflow.rs #5499
Documentation
- Clarify the documentation of
unnecessary_mut_passed
. #5639 - Extend example for
unneeded_field_pattern
. #5541
Rust 1.44
Released 2020-06-04
New lints
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
#5294
Moves and Deprecations
- Deprecate
replace_consts
lint #5380 - Move
cognitive_complexity
to nursery #5428 - Move
useless_transmute
to nursery #5364 - Downgrade
inefficient_to_string
to pedantic #5412 - Downgrade
option_option
to pedantic #5401 - Downgrade
unreadable_literal
to pedantic #5419 - Downgrade
let_unit_value
to pedantic #5409 - Downgrade
trivially_copy_pass_by_ref
to pedantic #5410 - Downgrade
implicit_hasher
to pedantic #5411
Enhancements
- On nightly you can now use
cargo clippy --fix -Z unstable-options
to auto-fix lints that support this #5363 - Make
redundant_clone
also trigger on cases where the cloned value is not consumed. #5304 - Expand
integer_arithmetic
to also disallow bit-shifting #5430 option_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 #5365- Expand
clone_on_copy
to work in method call arguments as well #5441 redundant_pattern_matching
now also handleswhile let
#5483integer_arithmetic
now also lints references of integers #5329- Expand
float_cmp_const
to also work on arrays #5345 - Trigger
map_flatten
when map is called on anOption
#5473
False Positive Fixes
many_single_char_names
#5468should_implement_trait
#5437unused_self
#5387redundant_clone
#5453precedence
#5445suspicious_op_assign_impl
#5424needless_lifetimes
#5293redundant_pattern
#5287inconsistent_digit_grouping
#5451
Suggestion Improvements
- Improved
question_mark
lint suggestion so that it doesn't add redundantas_ref()
#5481 - Improve the suggested placeholder in
option_map_unit_fn
#5292 - Improve suggestion for
match_single_binding
when triggered inside a closure #5350
ICE Fixes
Documentation
- Fix documentation generation for configurable lints #5353
- Update documentation for
new_ret_no_self
#5448 - The documentation for
option_option
now suggest using a tri-state enum #5403 - Fix bit mask example in
verbose_bit_mask
documentation #5454 wildcard_imports
documentation now mentions thatuse ...::prelude::*
is not linted #5312
Rust 1.43
Released 2020-04-23
New lints
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
#5258
Moves and Deprecations
- Move
unneeded_field_pattern
to pedantic group #5200
Enhancements
- Make
missing_errors_doc
lint also trigger onasync
functions #5181 - Add more constants to
approx_constant
#5193 - Extend
question_mark
lint #5266
False Positive Fixes
Suggestion Improvements
- Improve suggestion when blocks of code are suggested #5134
ICE Fixes
misc_early
lints #5129missing_errors_doc
#5213- Fix ICE when evaluating
usize
s #5256
Documentation
- Improve documentation of
iter_nth_zero
- Add documentation pages for stable releases #5171
Others
- Clippy now completely runs on GitHub Actions #5190
Rust 1.42
Released 2020-03-12
New lints
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
#5067
Moves and Deprecations
- Move
transmute_float_to_int
from nursery to complexity group #5015 - Move
range_plus_one
to pedantic group #5057 - Move
debug_assert_with_mut_call
to nursery group #5106 - Deprecate
unused_label
#4930
Enhancements
- Lint vectored IO in
unused_io_amount
#5027 - Make
vec_box
configurable by adding a size threshold #5081 - Also lint constants in
cmp_nan
#4910 - Fix false negative in
expect_fun_call
#4915 - Fix false negative in
redundant_clone
#5017
False Positive Fixes
map_clone
#4937replace_consts
#4977let_and_return
#5008eq_op
#5079possible_missing_comma
#5083debug_assert_with_mut_call
#5106- Don't trigger
let_underscore_must_use
in external macros #5082 - Don't trigger
empty_loop
inno_std
crates #5086
Suggestion Improvements
option_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
#5032
ICE fixes
Documentation
- Improve documentation of
empty_enum
,replace_consts
,redundant_clone
, anditerator_step_by_zero
Rust 1.41
Released 2020-01-30
- New Lints:
- Remove plugin interface, see Inside Rust Blog for details #4714
- Move
use_self
to nursery group #4863 - Deprecate
into_iter_on_array
#4788 - Expand
string_lit_as_bytes
to also trigger when literal has escapes #4808 - Fix false positive in
comparison_chain
#4842 - Fix false positive in
while_immutable_condition
#4730 - Fix false positive in
explicit_counter_loop
#4803 - Fix false positive in
must_use_candidate
#4794 - Fix false positive in
print_with_newline
andwrite_with_newline
#4769 - Fix false positive in
derive_hash_xor_eq
#4766 - Fix false positive in
missing_inline_in_public_items
#4870 - Fix false positive in
string_add
#4880 - Fix false positive in
float_arithmetic
#4851 - Fix false positive in
cast_sign_loss
#4883 - Fix false positive in
manual_swap
#4877 - Fix ICEs occurring while checking some block expressions #4772
- Fix ICE in
use_self
#4776 - Fix ICEs related to
const_generics
#4780 - Display help when running
clippy-driver
without arguments, instead of ICEing #4810 - Clippy has its own ICE message now #4588
- Show deprecated lints in the documentation again #4757
- Improve Documentation by adding positive examples to some lints #4832
Rust 1.40
Released 2019-12-19
- New Lints:
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
#4657
- Move
redundant_clone
to perf group #4509 - Move
manual_mul_add
to nursery group #4736 - Expand
unit_cmp
to also work withassert_eq!
,debug_assert_eq!
,assert_ne!
anddebug_assert_ne!
#4613 - Expand
integer_arithmetic
to also detect mutating arithmetic like+=
#4585 - Fix false positive in
nonminimal_bool
#4568 - Fix false positive in
missing_safety_doc
#4611 - Fix false positive in
cast_sign_loss
#4614 - Fix false positive in
redundant_clone
#4509 - Fix false positive in
try_err
#4721 - Fix false positive in
toplevel_ref_arg
#4570 - Fix false positive in
multiple_inherent_impl
#4593 - Improve more suggestions and tests in preparation for the unstable
cargo fix --clippy
#4575 - Improve suggestion for
zero_ptr
#4599 - Improve suggestion for
explicit_counter_loop
#4691 - Improve suggestion for
mul_add
#4602 - Improve suggestion for
assertions_on_constants
#4635 - Fix ICE in
use_self
#4671 - Fix ICE when encountering const casts #4590
Rust 1.39
Released 2019-11-07
- New Lints:
- Deprecate
unused_collect
lint. This is fully covered by rustc's#[must_use]
oncollect
#4348 - Move
type_repetition_in_bounds
to pedantic group #4403 - Move
cast_lossless
to pedantic group #4539 temporary_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 #4469- Fix false positives in
block_in_if_*
lints #4458 - Fix false positive in
cast_lossless
#4473 - Fix false positive in
clone_on_copy
#4411 - Fix false positive in
deref_addrof
#4487 - Fix false positive in
too_many_lines
#4490 - Fix false positive in
new_ret_no_self
#4365 - Fix false positive in
manual_swap
#4478 - Fix false positive in
missing_const_for_fn
#4450 - Fix false positive in
extra_unused_lifetimes
#4477 - Fix false positive in
inherent_to_string
#4460 - Fix false positive in
map_entry
#4495 - Fix false positive in
unused_unit
#4445 - Fix false positive in
redundant_pattern
#4489 - Fix false positive in
wrong_self_convention
#4369 - Improve various suggestions and tests in preparation for the unstable
cargo fix --clippy
#4558 - Improve suggestions for
redundant_pattern_matching
#4352 - Improve suggestions for
explicit_write
#4544 - Improve suggestion for
or_fun_call
#4522 - Improve suggestion for
match_as_ref
#4446 - Improve suggestion for
unnecessary_fold_span
#4382 - Add suggestions for
unseparated_literal_suffix
#4401 - Add suggestions for
char_lit_as_u8
#4418
Rust 1.38
Released 2019-09-26
- New Lints:
- Move
{unnnecessary,panicking}_unwrap
out of nursery #4307 - Extend the
use_self
lint to suggest uses ofSelf::Variant
#4308 - Improve suggestion for needless return #4262
- Add auto-fixable suggestion for
let_unit
#4337 - Fix false positive in
pub_enum_variant_names
andenum_variant_names
#4345 - Fix false positive in
cast_ptr_alignment
#4257 - Fix false positive in
string_lit_as_bytes
#4233 - Fix false positive in
needless_lifetimes
#4266 - Fix false positive in
float_cmp
#4275 - Fix false positives in
needless_return
#4274 - Fix false negative in
match_same_arms
#4246 - Fix incorrect suggestion for
needless_bool
#4335 - Improve suggestion for
cast_ptr_alignment
#4257 - Improve suggestion for
single_char_literal
#4361 - Improve suggestion for
len_zero
#4314 - Fix ICE in
implicit_hasher
#4268 - Fix allow bug in
trivially_copy_pass_by_ref
#4250
Rust 1.37
Released 2019-08-15
- New Lints:
- Renamed Lint:
const_static_lifetime
is now calledredundant_static_lifetimes
. The lint now covers statics in addition to consts #4162 match_same_arms
now warns for all identical arms, instead of only the first one #4102needless_return
now works with void functions #4220- Fix false positive in
redundant_closure
#4190 - Fix false positive in
useless_attribute
#4107 - Fix incorrect suggestion for
float_cmp
#4214 - Add suggestions for
print_with_newline
andwrite_with_newline
#4136 - Improve suggestions for
option_map_unwrap_or_else
andresult_map_unwrap_or_else
#4164 - Improve suggestions for
non_ascii_literal
#4119 - Improve diagnostics for
let_and_return
#4137 - Improve diagnostics for
trivially_copy_pass_by_ref
#4071 - Add macro check for
unreadable_literal
#4099
Rust 1.36
Released 2019-07-04
- New lints:
find_map
,filter_map_next
#4039 - New lint:
path_buf_push_overwrite
#3954 - Move
path_buf_push_overwrite
to the nursery #4013 - Split
redundant_closure
intoredundant_closure
andredundant_closure_for_method_calls
#4110 - Allow allowing of
toplevel_ref_arg
lint #4007 - Fix false negative in
or_fun_call
pertaining to nested constructors #4084 - Fix false positive in
or_fun_call
pertaining to enum variant constructors #4018 - Fix false positive in
useless_let_if_seq
pertaining to interior mutability #4035 - Fix false positive in
redundant_closure
pertaining to non-function types #4008 - Fix false positive in
let_and_return
pertaining to attributes onlet
s #4024 - Fix false positive in
module_name_repetitions
lint pertaining to attributes #4006 - Fix false positive on
assertions_on_constants
pertaining todebug_assert!
#3989 - Improve suggestion in
map_clone
to suggest.copied()
where applicable #3970 #4043 - Improve suggestion for
search_is_some
#4049 - Improve suggestion applicability for
naive_bytecount
#3984 - Improve suggestion applicability for
while_let_loop
#3975 - Improve diagnostics for
too_many_arguments
#4053 - Improve diagnostics for
cast_lossless
#4021 - Deal with macro checks in desugarings better #4082
- Add macro check for
unnecessary_cast
#4026 - Remove
approx_constant
's documentation's "Known problems" section. #4027 - Fix ICE in
suspicious_else_formatting
#3960 - Fix ICE in
decimal_literal_representation
#3931
Rust 1.35
Released 2019-05-20
- New lint:
drop_bounds
to detectT: Drop
bounds - Split
redundant_closure
intoredundant_closure
andredundant_closure_for_method_calls
#4110 - Rename
cyclomatic_complexity
tocognitive_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
andwrite_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, #3772, #3741
Rust 1.34
Released 2019-04-10
- New lint:
assertions_on_constants
to detect for exampleassert!(true)
- New lint:
dbg_macro
to detect uses of thedbg!
macro - New lint:
missing_const_for_fn
that can suggest functions to be madeconst
- New lint:
too_many_lines
to detect functions with excessive LOC. It can be configured using thetoo-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
andimplicit_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 for more details.
- We now have improved documentation on how to add new lints
Rust 1.33
Released 2019-02-26
- New lints:
implicit_return
,vec_box
,cast_ref_to_mut
- The
rust-clippy
repository is now part of therust-lang
org. - Rename
stutter
tomodule_name_repetitions
- Merge
new_without_default_derive
intonew_without_default
lint - Move
large_digit_groups
fromstyle
group topedantic
- Expand
bool_comparison
to check for<
,<=
,>
,>=
, and!=
comparisons against booleans - Expand
no_effect
to detect writes to constants such asA_CONST.field = 2
- Expand
redundant_clone
to work on struct fields - Expand
suspicious_else_formatting
to detectif .. {..} {..}
- Expand
use_self
to work on tuple structs and also in local macros - Fix ICE in
result_map_unit_fn
andoption_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
Released 2019-01-17
- New lints:
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_metadata
- Add support for
u128
andi128
to integer related lints - Add float support to
mistyped_literal_suffixes
- Fix false positives in
use_self
- Fix false positives in
missing_comma
- Fix false positives in
new_ret_no_self
- Fix false positives in
possible_missing_comma
- Fix false positive in
integer_arithmetic
in constant items - Fix false positive in
needless_borrow
- Fix false positive in
out_of_bounds_indexing
- Fix false positive in
new_without_default_derive
- Fix false positive in
string_lit_as_bytes
- Fix false negative in
out_of_bounds_indexing
- Fix false negative in
use_self
. It will now also check existential types - Fix incorrect suggestion for
redundant_closure_call
- Fix various suggestions that contained expanded macros
- Fix
bool_comparison
triggering 3 times on on on the same code - Expand
trivially_copy_pass_by_ref
to work on trait methods - Improve suggestion for
needless_range_loop
- Move
needless_pass_by_value
frompedantic
group tostyle
Rust 1.31
Released 2018-12-06
- Clippy has been relicensed under a dual MIT / Apache license. See #3093 for more information.
- With Rust 1.31, Clippy is no longer available via crates.io. The recommended
installation method is via
rustup component add clippy
. - New lints:
redundant_pattern_matching
,unnecessary_filter_map
,unused_unit
,map_flatten
,mem_replace_option_with_none
- Fix ICE in
if_let_redundant_pattern_matching
- Fix ICE in
needless_pass_by_value
when encountering a generic function argument with a lifetime parameter - Fix ICE in
needless_range_loop
- Fix ICE in
single_char_pattern
when encountering a constant value - Fix false positive in
assign_op_pattern
- Fix false positive in
boxed_local
on trait implementations - Fix false positive in
cmp_owned
- Fix false positive in
collapsible_if
when conditionals have comments - Fix false positive in
double_parens
- Fix false positive in
excessive_precision
- Fix false positive in
explicit_counter_loop
- Fix false positive in
fn_to_numeric_cast_with_truncation
- Fix false positive in
map_clone
- Fix false positive in
new_ret_no_self
- Fix false positive in
new_without_default
whennew
is unsafe - Fix false positive in
type_complexity
when using extern types - Fix false positive in
useless_format
- Fix false positive in
wrong_self_convention
- Fix incorrect suggestion for
excessive_precision
- Fix incorrect suggestion for
expect_fun_call
- Fix incorrect suggestion for
get_unwrap
- Fix incorrect suggestion for
useless_format
fn_to_numeric_cast_with_truncation
lint can be disabled again- Improve suggestions for
manual_memcpy
- Improve help message for
needless_lifetimes
Rust 1.30
Released 2018-10-25
- Deprecate
assign_ops
lint - New lints:
mistyped_literal_suffixes
,ptr_offset_with_cast
,needless_collect
,copy_iterator
cargo clippy -V
now includes the Clippy commit hash of the Rust Clippy component- Fix ICE in
implicit_hasher
- Fix ICE when encountering
println!("{}" a);
- Fix ICE when encountering a macro call in match statements
- Fix false positive in
default_trait_access
- Fix false positive in
trivially_copy_pass_by_ref
- Fix false positive in
similar_names
- Fix false positive in
redundant_field_name
- Fix false positive in
expect_fun_call
- Fix false negative in
identity_conversion
- Fix false negative in
explicit_counter_loop
- Fix
range_plus_one
suggestion and false negative print_with_newline
/write_with_newline
: don't warn about string with several\n
s in them- Fix
useless_attribute
to also whitelistunused_extern_crates
- Fix incorrect suggestion for
single_char_pattern
- Improve suggestion for
identity_conversion
lint - Move
explicit_iter_loop
andexplicit_into_iter_loop
fromstyle
group topedantic
- Move
range_plus_one
andrange_minus_one
fromnursery
group tocomplexity
- Move
shadow_unrelated
fromrestriction
group topedantic
- Move
indexing_slicing
frompedantic
group torestriction
Rust 1.29
Released 2018-09-13
- 🎉 🎉 Rust 1.29 is the first stable Rust that includes a bundled Clippy 🎉
🎉
You can now run
rustup component add clippy-preview
and thencargo clippy
to run Clippy. This should put an end to the continuous nightly upgrades for Clippy users. - Clippy now follows the Rust versioning scheme instead of its own
- Fix ICE when encountering a
while let (..) = x.iter()
construct - Fix false positives in
use_self
- Fix false positive in
trivially_copy_pass_by_ref
- Fix false positive in
useless_attribute
lint - Fix false positive in
print_literal
- Fix
use_self
regressions - Improve lint message for
neg_cmp_op_on_partial_ord
- Improve suggestion highlight for
single_char_pattern
- Improve suggestions for various print/write macro lints
- Improve website header
0.0.212 (2018-07-10)
- Rustup to rustc 1.29.0-nightly (e06c87544 2018-07-06)
0.0.211
- Rustup to rustc 1.28.0-nightly (e3bf634e0 2018-06-28)
0.0.210
- Rustup to rustc 1.28.0-nightly (01cc982e9 2018-06-24)
0.0.209
- Rustup to rustc 1.28.0-nightly (523097979 2018-06-18)
0.0.208
- Rustup to rustc 1.28.0-nightly (86a8f1a63 2018-06-17)
0.0.207
- Rustup to rustc 1.28.0-nightly (2a0062974 2018-06-09)
0.0.206
- Rustup to rustc 1.28.0-nightly (5bf68db6e 2018-05-28)
0.0.205
- Rustup to rustc 1.28.0-nightly (990d8aa74 2018-05-25)
- Rename
unused_lifetimes
toextra_unused_lifetimes
because of naming conflict with new rustc lint
0.0.204
- Rustup to rustc 1.28.0-nightly (71e87be38 2018-05-22)
0.0.203
- Rustup to rustc 1.28.0-nightly (a3085756e 2018-05-19)
- Clippy attributes are now of the form
clippy::cyclomatic_complexity
instead ofclippy(cyclomatic_complexity)
0.0.202
- Rustup to rustc 1.28.0-nightly (952f344cd 2018-05-18)
0.0.201
- Rustup to rustc 1.27.0-nightly (2f2a11dfc 2018-05-16)
0.0.200
- Rustup to rustc 1.27.0-nightly (9fae15374 2018-05-13)
0.0.199
- Rustup to rustc 1.27.0-nightly (ff2ac35db 2018-05-12)
0.0.198
- Rustup to rustc 1.27.0-nightly (acd3871ba 2018-05-10)
0.0.197
- Rustup to rustc 1.27.0-nightly (428ea5f6b 2018-05-06)
0.0.196
- Rustup to rustc 1.27.0-nightly (e82261dfb 2018-05-03)
0.0.195
- Rustup to rustc 1.27.0-nightly (ac3c2288f 2018-04-18)
0.0.194
- Rustup to rustc 1.27.0-nightly (bd40cbbe1 2018-04-14)
- New lints:
cast_ptr_alignment
,transmute_ptr_to_ptr
,write_literal
,write_with_newline
,writeln_empty_string
0.0.193
- Rustup to rustc 1.27.0-nightly (eeea94c11 2018-04-06)
0.0.192
- Rustup to rustc 1.27.0-nightly (fb44b4c0e 2018-04-04)
- New lint:
print_literal
0.0.191
- Rustup to rustc 1.26.0-nightly (ae544ee1c 2018-03-29)
- Lint audit; categorize lints as style, correctness, complexity, pedantic, nursery, restriction.
0.0.190
- Fix a bunch of intermittent cargo bugs
0.0.189
- Rustup to rustc 1.26.0-nightly (5508b2714 2018-03-18)
0.0.188
- Rustup to rustc 1.26.0-nightly (392645394 2018-03-15)
- New lint:
while_immutable_condition
0.0.187
- Rustup to rustc 1.26.0-nightly (322d7f7b9 2018-02-25)
- New lints:
redundant_field_names
,suspicious_arithmetic_impl
,suspicious_op_assign_impl
0.0.186
- Rustup to rustc 1.25.0-nightly (0c6091fbd 2018-02-04)
- Various false positive fixes
0.0.185
- Rustup to rustc 1.25.0-nightly (56733bc9f 2018-02-01)
- New lint:
question_mark
0.0.184
- Rustup to rustc 1.25.0-nightly (90eb44a58 2018-01-29)
- New lints:
double_comparisons
,empty_line_after_outer_attr
0.0.183
- Rustup to rustc 1.25.0-nightly (21882aad7 2018-01-28)
- New lint:
misaligned_transmute
0.0.182
- Rustup to rustc 1.25.0-nightly (a0dcecff9 2018-01-24)
- New lint:
decimal_literal_representation
0.0.181
- Rustup to rustc 1.25.0-nightly (97520ccb1 2018-01-21)
- New lints:
else_if_without_else
,option_option
,unit_arg
,unnecessary_fold
- Removed
unit_expr
- Various false positive fixes for
needless_pass_by_value
0.0.180
- Rustup to rustc 1.25.0-nightly (3f92e8d89 2018-01-14)
0.0.179
- Rustup to rustc 1.25.0-nightly (61452e506 2018-01-09)
0.0.178
- Rustup to rustc 1.25.0-nightly (ee220daca 2018-01-07)
0.0.177
- Rustup to rustc 1.24.0-nightly (250b49205 2017-12-21)
- New lint:
match_as_ref
0.0.176
- Rustup to rustc 1.24.0-nightly (0077d128d 2017-12-14)
0.0.175
- Rustup to rustc 1.24.0-nightly (bb42071f6 2017-12-01)
0.0.174
- Rustup to rustc 1.23.0-nightly (63739ab7b 2017-11-21)
0.0.173
- Rustup to rustc 1.23.0-nightly (33374fa9d 2017-11-20)
0.0.172
- Rustup to rustc 1.23.0-nightly (d0f8e2913 2017-11-16)
0.0.171
- Rustup to rustc 1.23.0-nightly (ff0f5de3b 2017-11-14)
0.0.170
- Rustup to rustc 1.23.0-nightly (d6b06c63a 2017-11-09)
0.0.169
- Rustup to rustc 1.23.0-nightly (3b82e4c74 2017-11-05)
- New lints:
just_underscores_and_digits
,result_map_unwrap_or_else
,transmute_bytes_to_str
0.0.168
- Rustup to rustc 1.23.0-nightly (f0fe716db 2017-10-30)
0.0.167
- Rustup to rustc 1.23.0-nightly (90ef3372e 2017-10-29)
- New lints:
const_static_lifetime
,erasing_op
,fallible_impl_from
,println_empty_string
,useless_asref
0.0.166
- Rustup to rustc 1.22.0-nightly (b7960878b 2017-10-18)
- New lints:
explicit_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_float
0.0.165
- Rust upgrade to rustc 1.22.0-nightly (0e6f4cf51 2017-09-27)
- New lint:
mut_range_bound
0.0.164
- Update to rustc 1.22.0-nightly (6c476ce46 2017-09-25)
- New lint:
int_plus_one
0.0.163
- Update to rustc 1.22.0-nightly (14039a42a 2017-09-22)
0.0.162
- Update to rustc 1.22.0-nightly (0701b37d9 2017-09-18)
- New lint:
chars_last_cmp
- Improved suggestions for
needless_borrow
,ptr_arg
,
0.0.161
- Update to rustc 1.22.0-nightly (539f2083d 2017-09-13)
0.0.160
- Update to rustc 1.22.0-nightly (dd08c3070 2017-09-12)
0.0.159
- Update to rustc 1.22.0-nightly (eba374fb2 2017-09-11)
- New lint:
clone_on_ref_ptr
0.0.158
- New lint:
manual_memcpy
cast_lossless
no longer has redundant parentheses in its suggestions- Update to rustc 1.22.0-nightly (dead08cb3 2017-09-08)
0.0.157 - 2017-09-04
- Update to rustc 1.22.0-nightly (981ce7d8d 2017-09-03)
- New lint:
unit_expr
0.0.156 - 2017-09-03
- Update to rustc 1.22.0-nightly (744dd6c1d 2017-09-02)
0.0.155
- Update to rustc 1.21.0-nightly (c11f689d2 2017-08-29)
- New lint:
infinite_iter
,maybe_infinite_iter
,cast_lossless
0.0.154
- Update to rustc 1.21.0-nightly (2c0558f63 2017-08-24)
- Fix
use_self
triggering inside derives - Add support for linting an entire workspace with
cargo clippy --all
- New lint:
naive_bytecount
0.0.153
- Update to rustc 1.21.0-nightly (8c303ed87 2017-08-20)
- New lint:
use_self
0.0.152
- Update to rustc 1.21.0-nightly (df511d554 2017-08-14)
0.0.151
- Update to rustc 1.21.0-nightly (13d94d5fa 2017-08-10)
0.0.150
- Update to rustc 1.21.0-nightly (215e0b10e 2017-08-08)
0.0.148
- Update to rustc 1.21.0-nightly (37c7d0ebb 2017-07-31)
- New lints:
unreadable_literal
,inconsistent_digit_grouping
,large_digit_groups
0.0.147
- Update to rustc 1.21.0-nightly (aac223f4f 2017-07-30)
0.0.146
- Update to rustc 1.21.0-nightly (52a330969 2017-07-27)
- Fixes false positives in
inline_always
- Fixes false negatives in
panic_params
0.0.145
- Update to rustc 1.20.0-nightly (afe145d22 2017-07-23)
0.0.144
- Update to rustc 1.20.0-nightly (086eaa78e 2017-07-15)
0.0.143
- Update to rustc 1.20.0-nightly (d84693b93 2017-07-09)
- Fix
cargo clippy
crashing ondylib
projects - Fix false positives around
nested_while_let
andnever_loop
0.0.142
- Update to rustc 1.20.0-nightly (067971139 2017-07-02)
0.0.141
- Rewrite of the
doc_markdown
lint. - Deprecated
range_step_by_zero
- New lint:
iterator_step_by_zero
- New lint:
needless_borrowed_reference
- Update to rustc 1.20.0-nightly (69c65d296 2017-06-28)
0.0.140 - 2017-06-16
- Update to rustc 1.19.0-nightly (258ae6dd9 2017-06-15)
0.0.139 — 2017-06-10
- Update to rustc 1.19.0-nightly (4bf5c99af 2017-06-10)
- Fix bugs with for loop desugaring
- Check for
AsRef
/AsMut
arguments inwrong_self_convention
0.0.138 — 2017-06-05
- Update to rustc 1.19.0-nightly (0418fa9d3 2017-06-04)
0.0.137 — 2017-06-05
- Update to rustc 1.19.0-nightly (6684d176c 2017-06-03)
0.0.136 — 2017—05—26
- Update to rustc 1.19.0-nightly (557967766 2017-05-26)
0.0.135 — 2017—05—24
- Update to rustc 1.19.0-nightly (5b13bff52 2017-05-23)
0.0.134 — 2017—05—19
- Update to rustc 1.19.0-nightly (0ed1ec9f9 2017-05-18)
0.0.133 — 2017—05—14
- Update to rustc 1.19.0-nightly (826d8f385 2017-05-13)
0.0.132 — 2017—05—05
- Fix various bugs and some ices
0.0.131 — 2017—05—04
- Update to rustc 1.19.0-nightly (2d4ed8e0c 2017-05-03)
0.0.130 — 2017—05—03
- Update to rustc 1.19.0-nightly (6a5fc9eec 2017-05-02)
0.0.129 — 2017-05-01
- Update to rustc 1.19.0-nightly (06fb4d256 2017-04-30)
0.0.128 — 2017-04-28
- Update to rustc 1.18.0-nightly (94e884b63 2017-04-27)
0.0.127 — 2017-04-27
- Update to rustc 1.18.0-nightly (036983201 2017-04-26)
- New lint:
needless_continue
0.0.126 — 2017-04-24
- Update to rustc 1.18.0-nightly (2bd4b5c6d 2017-04-23)
0.0.125 — 2017-04-19
- Update to rustc 1.18.0-nightly (9f2abadca 2017-04-18)
0.0.124 — 2017-04-16
- Update to rustc 1.18.0-nightly (d5cf1cb64 2017-04-15)
0.0.123 — 2017-04-07
- Fix various false positives
0.0.122 — 2017-04-07
- Rustup to rustc 1.18.0-nightly (91ae22a01 2017-04-05)
- New lint:
op_ref
0.0.121 — 2017-03-21
- Rustup to rustc 1.17.0-nightly (134c4a0f0 2017-03-20)
0.0.120 — 2017-03-17
- Rustup to rustc 1.17.0-nightly (0aeb9c129 2017-03-15)
0.0.119 — 2017-03-13
- Rustup to rustc 1.17.0-nightly (824c9ebbd 2017-03-12)
0.0.118 — 2017-03-05
- Rustup to rustc 1.17.0-nightly (b1e31766d 2017-03-03)
0.0.117 — 2017-03-01
- Rustup to rustc 1.17.0-nightly (be760566c 2017-02-28)
0.0.116 — 2017-02-28
- Fix
cargo clippy
on 64 bit windows systems
0.0.115 — 2017-02-27
- Rustup to rustc 1.17.0-nightly (60a0edc6c 2017-02-26)
- New lints:
zero_ptr
,never_loop
,mut_from_ref
0.0.114 — 2017-02-08
- Rustup to rustc 1.17.0-nightly (c49d10207 2017-02-07)
- Tests are now ui tests (testing the exact output of rustc)
0.0.113 — 2017-02-04
- Rustup to rustc 1.16.0-nightly (eedaa94e3 2017-02-02)
- New lint:
large_enum_variant
explicit_into_iter_loop
provides suggestions
0.0.112 — 2017-01-27
- Rustup to rustc 1.16.0-nightly (df8debf6d 2017-01-25)
0.0.111 — 2017-01-21
- Rustup to rustc 1.16.0-nightly (a52da95ce 2017-01-20)
0.0.110 — 2017-01-20
- Add badges and categories to
Cargo.toml
0.0.109 — 2017-01-19
- Update to rustc 1.16.0-nightly (c07a6ae77 2017-01-17)
0.0.108 — 2017-01-12
- Update to rustc 1.16.0-nightly (2782e8f8f 2017-01-12)
0.0.107 — 2017-01-11
- Update regex dependency
- Fix FP when matching
&&mut
by&ref
- Reintroduce
for (_, x) in &mut hash_map
->for x in hash_map.values_mut()
- New lints:
unused_io_amount
,forget_ref
,short_circuit_statement
0.0.106 — 2017-01-04
- Fix FP introduced by rustup in
wrong_self_convention
0.0.105 — 2017-01-04
- Update to rustc 1.16.0-nightly (468227129 2017-01-03)
- New lints:
deref_addrof
,double_parens
,pub_enum_variant_names
- Fix suggestion in
new_without_default
- FP fix in
absurd_extreme_comparisons
0.0.104 — 2016-12-15
- Update to rustc 1.15.0-nightly (8f02c429a 2016-12-15)
0.0.103 — 2016-11-25
- Update to rustc 1.15.0-nightly (d5814b03e 2016-11-23)
0.0.102 — 2016-11-24
- Update to rustc 1.15.0-nightly (3bf2be9ce 2016-11-22)
0.0.101 — 2016-11-23
- Update to rustc 1.15.0-nightly (7b3eeea22 2016-11-21)
- New lint:
string_extend_chars
0.0.100 — 2016-11-20
- Update to rustc 1.15.0-nightly (ac635aa95 2016-11-18)
0.0.99 — 2016-11-18
- Update to rustc 1.15.0-nightly (0ed951993 2016-11-14)
- New lint:
get_unwrap
0.0.98 — 2016-11-08
- Fixes an issue due to a change in how cargo handles
--sysroot
, which brokecargo clippy
0.0.97 — 2016-11-03
- For convenience,
cargo clippy
defines acargo-clippy
feature. This was previously added for a short time under the nameclippy
but removed for compatibility. cargo clippy --help
is more helping (and less helpful 😄)- Rustup to rustc 1.14.0-nightly (5665bdf3e 2016-11-02)
- New lints:
if_let_redundant_pattern_matching
,partialeq_ne_impl
0.0.96 — 2016-10-22
- Rustup to rustc 1.14.0-nightly (f09420685 2016-10-20)
- New lint:
iter_skip_next
0.0.95 — 2016-10-06
- Rustup to rustc 1.14.0-nightly (3210fd5c2 2016-10-05)
0.0.94 — 2016-10-04
- Fixes bustage on Windows due to forbidden directory name
0.0.93 — 2016-10-03
- Rustup to rustc 1.14.0-nightly (144af3e97 2016-10-02)
option_map_unwrap_or
andoption_map_unwrap_or_else
are now allowed by default.- New lint:
explicit_into_iter_loop
0.0.92 — 2016-09-30
- Rustup to rustc 1.14.0-nightly (289f3a4ca 2016-09-29)
0.0.91 — 2016-09-28
- Rustup to rustc 1.13.0-nightly (d0623cf7b 2016-09-26)
0.0.90 — 2016-09-09
- Rustup to rustc 1.13.0-nightly (f1f40f850 2016-09-09)
0.0.89 — 2016-09-06
- Rustup to rustc 1.13.0-nightly (cbe4de78e 2016-09-05)
0.0.88 — 2016-09-04
- Rustup to rustc 1.13.0-nightly (70598e04f 2016-09-03)
- The following lints are not new but were only usable through the
clippy
lint groups:filter_next
,for_loop_over_option
,for_loop_over_result
andmatch_overlapping_arm
. You should now be able to#[allow/deny]
them individually and they are available directly throughcargo clippy
.
0.0.87 — 2016-08-31
- Rustup to rustc 1.13.0-nightly (eac41469d 2016-08-30)
- New lints:
builtin_type_shadow
- Fix FP in
zero_prefixed_literal
and0b
/0o
0.0.86 — 2016-08-28
- Rustup to rustc 1.13.0-nightly (a23064af5 2016-08-27)
- New lints:
missing_docs_in_private_items
,zero_prefixed_literal
0.0.85 — 2016-08-19
- Fix ICE with
useless_attribute
useless_attribute
ignoresunused_imports
onuse
statements
0.0.84 — 2016-08-18
- Rustup to rustc 1.13.0-nightly (aef6971ca 2016-08-17)
0.0.83 — 2016-08-17
- Rustup to rustc 1.12.0-nightly (1bf5fa326 2016-08-16)
- New lints:
print_with_newline
,useless_attribute
0.0.82 — 2016-08-17
- Rustup to rustc 1.12.0-nightly (197be89f3 2016-08-15)
- New lint:
module_inception
0.0.81 — 2016-08-14
- Rustup to rustc 1.12.0-nightly (1deb02ea6 2016-08-12)
- New lints:
eval_order_dependence
,mixed_case_hex_literals
,unseparated_literal_suffix
- False positive fix in
too_many_arguments
- Addition of functionality to
needless_borrow
- Suggestions for
clone_on_copy
- Bug fix in
wrong_self_convention
- Doc improvements
0.0.80 — 2016-07-31
- Rustup to rustc 1.12.0-nightly (1225e122f 2016-07-30)
- New lints:
misrefactored_assign_op
,serde_api_misuse
0.0.79 — 2016-07-10
- Rustup to rustc 1.12.0-nightly (f93aaf84c 2016-07-09)
- Major suggestions refactoring
0.0.78 — 2016-07-02
- Rustup to rustc 1.11.0-nightly (01411937f 2016-07-01)
- New lints:
wrong_transmute
,double_neg
,filter_map
- For compatibility,
cargo clippy
does not defines theclippy
feature introduced in 0.0.76 anymore collapsible_if
now considersif let
0.0.77 — 2016-06-21
- Rustup to rustc 1.11.0-nightly (5522e678b 2016-06-20)
- New lints:
stutter
anditer_nth
0.0.76 — 2016-06-10
- Rustup to rustc 1.11.0-nightly (7d2f75a95 2016-06-09)
cargo clippy
now automatically defines theclippy
feature- New lint:
not_unsafe_ptr_arg_deref
0.0.75 — 2016-06-08
- Rustup to rustc 1.11.0-nightly (763f9234b 2016-06-06)
0.0.74 — 2016-06-07
- Fix bug with
cargo-clippy
JSON parsing - Add the
CLIPPY_DISABLE_DOCS_LINKS
environment variable to deactivate the “for further information visit lint-link” message.
0.0.73 — 2016-06-05
- Fix false positives in
useless_let_if_seq
0.0.72 — 2016-06-04
- Fix false positives in
useless_let_if_seq
0.0.71 — 2016-05-31
- Rustup to rustc 1.11.0-nightly (a967611d8 2016-05-30)
- New lint:
useless_let_if_seq
0.0.70 — 2016-05-28
- Rustup to rustc 1.10.0-nightly (7bddce693 2016-05-27)
invalid_regex
andtrivial_regex
can now warn onRegexSet::new
,RegexBuilder::new
and byte regexes
0.0.69 — 2016-05-20
- Rustup to rustc 1.10.0-nightly (476fe6eef 2016-05-21)
used_underscore_binding
has been madeAllow
temporarily
0.0.68 — 2016-05-17
- Rustup to rustc 1.10.0-nightly (cd6a40017 2016-05-16)
- New lint:
unnecessary_operation
0.0.67 — 2016-05-12
- Rustup to rustc 1.10.0-nightly (22ac88f1a 2016-05-11)
0.0.66 — 2016-05-11
- New
cargo clippy
subcommand - New lints:
assign_op_pattern
,assign_ops
,needless_borrow
0.0.65 — 2016-05-08
- Rustup to rustc 1.10.0-nightly (62e2b2fb7 2016-05-06)
- New lints:
float_arithmetic
,integer_arithmetic
0.0.64 — 2016-04-26
- Rustup to rustc 1.10.0-nightly (645dd013a 2016-04-24)
- New lints:
temporary_cstring_as_ptr
,unsafe_removed_from_name
, andmem_forget
0.0.63 — 2016-04-08
- Rustup to rustc 1.9.0-nightly (7979dd608 2016-04-07)
0.0.62 — 2016-04-07
- Rustup to rustc 1.9.0-nightly (bf5da36f1 2016-04-06)
0.0.61 — 2016-04-03
- Rustup to rustc 1.9.0-nightly (5ab11d72c 2016-04-02)
- New lint:
invalid_upcast_comparisons
0.0.60 — 2016-04-01
- Rustup to rustc 1.9.0-nightly (e1195c24b 2016-03-31)
0.0.59 — 2016-03-31
- Rustup to rustc 1.9.0-nightly (30a3849f2 2016-03-30)
- New lints:
logic_bug
,nonminimal_bool
- Fixed:
match_same_arms
now ignores arms with guards - Improved:
useless_vec
now warns onfor … in vec![…]
0.0.58 — 2016-03-27
- Rustup to rustc 1.9.0-nightly (d5a91e695 2016-03-26)
- New lint:
doc_markdown
0.0.57 — 2016-03-27
- Update to rustc 1.9.0-nightly (a1e29daf1 2016-03-25)
- Deprecated lints:
str_to_string
,string_to_string
,unstable_as_slice
,unstable_as_mut_slice
- New lint:
crosspointer_transmute
0.0.56 — 2016-03-23
- Update to rustc 1.9.0-nightly (0dcc413e4 2016-03-22)
- New lints:
many_single_char_names
andsimilar_names
0.0.55 — 2016-03-21
- Update to rustc 1.9.0-nightly (02310fd31 2016-03-19)
0.0.54 — 2016-03-16
- Update to rustc 1.9.0-nightly (c66d2380a 2016-03-15)
0.0.53 — 2016-03-15
- Add a configuration file
0.0.52
0.0.51 — 2016-03-13
- Add
str
to types considered bylen_zero
- New lints:
indexing_slicing
0.0.50 — 2016-03-11
- Update to rustc 1.9.0-nightly (c9629d61c 2016-03-10)
0.0.49 — 2016-03-09
- Update to rustc 1.9.0-nightly (eabfc160f 2016-03-08)
- New lints:
overflow_check_conditional
,unused_label
,new_without_default
0.0.48 — 2016-03-07
- Fixed: ICE in
needless_range_loop
with globals
0.0.47 — 2016-03-07
- Update to rustc 1.9.0-nightly (998a6720b 2016-03-07)
- New lint:
redundant_closure_call