Skip to content

Commit 2835224

Browse files
committedJun 9, 2020
Auto merge of #72972 - lzutao:clippy, r=Manishearth
Pull changes from rust-lang/rust-clippy
2 parents feb3536 + 41c845e commit 2835224

File tree

143 files changed

+3943
-914
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+3943
-914
lines changed
 

‎src/tools/clippy/.github/workflows/clippy_bors.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,8 @@ jobs:
232232
matrix:
233233
integration:
234234
- 'rust-lang/cargo'
235-
- 'rust-lang/rls'
235+
# FIXME: re-enable once fmt_macros is renamed in RLS
236+
# - 'rust-lang/rls'
236237
- 'rust-lang/chalk'
237238
- 'rust-lang/rustfmt'
238239
- 'Marwes/combine'

‎src/tools/clippy/CHANGELOG.md

+84-3
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,88 @@ document.
66

77
## Unreleased / In Rust Nightly
88

9-
[891e1a8...master](https://github.com/rust-lang/rust-clippy/compare/891e1a8...master)
9+
[7ea7cd1...master](https://github.com/rust-lang/rust-clippy/compare/7ea7cd1...master)
10+
11+
## Rust 1.45
12+
13+
Current beta, release 2020-07-16
14+
15+
[891e1a8...7ea7cd1](https://github.com/rust-lang/rust-clippy/compare/891e1a8...7ea7cd1)
16+
17+
### New lints
18+
19+
* [`match_wildcard_for_single_variants`] [#5582](https://github.com/rust-lang/rust-clippy/pull/5582)
20+
* [`unsafe_derive_deserialize`] [#5493](https://github.com/rust-lang/rust-clippy/pull/5493)
21+
* [`if_let_mutex`] [#5332](https://github.com/rust-lang/rust-clippy/pull/5332)
22+
* [`mismatched_target_os`] [#5506](https://github.com/rust-lang/rust-clippy/pull/5506)
23+
* [`await_holding_lock`] [#5439](https://github.com/rust-lang/rust-clippy/pull/5439)
24+
* [`match_on_vec_items`] [#5522](https://github.com/rust-lang/rust-clippy/pull/5522)
25+
* [`manual_async_fn`] [#5576](https://github.com/rust-lang/rust-clippy/pull/5576)
26+
* [`reversed_empty_ranges`] [#5583](https://github.com/rust-lang/rust-clippy/pull/5583)
27+
* [`manual_non_exhaustive`] [#5550](https://github.com/rust-lang/rust-clippy/pull/5550)
28+
29+
### Moves and Deprecations
30+
31+
* Downgrade [`match_bool`] to pedantic [#5408](https://github.com/rust-lang/rust-clippy/pull/5408)
32+
* Downgrade [`match_wild_err_arm`] to pedantic and update help messages. [#5622](https://github.com/rust-lang/rust-clippy/pull/5622)
33+
* Downgrade [`useless_let_if_seq`] to nursery. [#5599](https://github.com/rust-lang/rust-clippy/pull/5599)
34+
* Generalize `option_and_then_some` and rename to [`bind_instead_of_map`]. [#5529](https://github.com/rust-lang/rust-clippy/pull/5529)
35+
* Rename `identity_conversion` to [`useless_conversion`]. [#5568](https://github.com/rust-lang/rust-clippy/pull/5568)
36+
* Merge `block_in_if_condition_expr` and `block_in_if_condition_stmt` into [`blocks_in_if_conditions`].
37+
[#5563](https://github.com/rust-lang/rust-clippy/pull/5563)
38+
* Merge `option_map_unwrap_or`, `option_map_unwrap_or_else` and `result_map_unwrap_or_else` into [`map_unwrap_or`].
39+
[#5563](https://github.com/rust-lang/rust-clippy/pull/5563)
40+
* Merge `option_unwrap_used` and `result_unwrap_used` into [`unwrap_used`].
41+
[#5563](https://github.com/rust-lang/rust-clippy/pull/5563)
42+
* Merge `option_expect_used` and `result_expect_used` into [`expect_used`].
43+
[#5563](https://github.com/rust-lang/rust-clippy/pull/5563)
44+
* Merge `for_loop_over_option` and `for_loop_over_result` into [`for_loops_over_fallibles`].
45+
[#5563](https://github.com/rust-lang/rust-clippy/pull/5563)
46+
47+
### Enhancements
48+
49+
* Avoid running cargo lints when not enabled to improve performance. [#5505](https://github.com/rust-lang/rust-clippy/pull/5505)
50+
* Extend [`useless_conversion`] with `TryFrom` and `TryInto`. [#5631](https://github.com/rust-lang/rust-clippy/pull/5631)
51+
* Lint also in type parameters and where clauses in [`unused_unit`]. [#5592](https://github.com/rust-lang/rust-clippy/pull/5592)
52+
* Do not suggest deriving `Default` in [`new_without_default`]. [#5616](https://github.com/rust-lang/rust-clippy/pull/5616)
53+
54+
### False Positive Fixes
55+
56+
* [`while_let_on_iterator`] [#5525](https://github.com/rust-lang/rust-clippy/pull/5525)
57+
* [`empty_line_after_outer_attr`] [#5609](https://github.com/rust-lang/rust-clippy/pull/5609)
58+
* [`unnecessary_unwrap`] [#5558](https://github.com/rust-lang/rust-clippy/pull/5558)
59+
* [`comparison_chain`] [#5596](https://github.com/rust-lang/rust-clippy/pull/5596)
60+
* Don't trigger [`used_underscore_binding`] in await desugaring. [#5535](https://github.com/rust-lang/rust-clippy/pull/5535)
61+
* Don't trigger [`borrowed_box`] on mutable references. [#5491](https://github.com/rust-lang/rust-clippy/pull/5491)
62+
* Allow `1 << 0` in [`identity_op`]. [#5602](https://github.com/rust-lang/rust-clippy/pull/5602)
63+
* Allow `use super::*;` glob imports in [`wildcard_imports`]. [#5564](https://github.com/rust-lang/rust-clippy/pull/5564)
64+
* Whitelist more words in [`doc_markdown`]. [#5611](https://github.com/rust-lang/rust-clippy/pull/5611)
65+
* Skip dev and build deps in [`multiple_crate_versions`]. [#5636](https://github.com/rust-lang/rust-clippy/pull/5636)
66+
* Honor `allow` attribute on arguments in [`ptr_arg`]. [#5647](https://github.com/rust-lang/rust-clippy/pull/5647)
67+
* Honor lint level attributes for [`redundant_field_names`], [`just_underscores_and_digits`], [`many_single_char_names`]
68+
and [`similar_names`]. [#5651](https://github.com/rust-lang/rust-clippy/pull/5651)
69+
* Ignore calls to `len` in [`or_fun_call`]. [#4429](https://github.com/rust-lang/rust-clippy/pull/4429)
70+
71+
### Suggestion Improvements
72+
73+
* Simplify suggestions in [`manual_memcpy`]. [#5536](https://github.com/rust-lang/rust-clippy/pull/5536)
74+
* Fix suggestion in [`redundant_pattern_matching`] for macros. [#5511](https://github.com/rust-lang/rust-clippy/pull/5511)
75+
* Avoid suggesting `copied()` for mutable references in [`map_clone`]. [#5530](https://github.com/rust-lang/rust-clippy/pull/5530)
76+
* Improve help message for [`clone_double_ref`]. [#5547](https://github.com/rust-lang/rust-clippy/pull/5547)
77+
78+
### ICE Fixes
79+
80+
* Fix ICE caused in unwrap module. [#5590](https://github.com/rust-lang/rust-clippy/pull/5590)
81+
* Fix ICE on rustc test issue-69020-assoc-const-arith-overflow.rs [#5499](https://github.com/rust-lang/rust-clippy/pull/5499)
82+
83+
### Documentation
84+
85+
* Clarify the documentation of [`unnecessary_mut_passed`]. [#5639](https://github.com/rust-lang/rust-clippy/pull/5639)
86+
* Extend example for [`unneeded_field_pattern`]. [#5541](https://github.com/rust-lang/rust-clippy/pull/5541)
1087

1188
## Rust 1.44
1289

13-
Current beta, release 2020-06-04
90+
Current stable, released 2020-06-04
1491

1592
[204bb9b...891e1a8](https://github.com/rust-lang/rust-clippy/compare/204bb9b...891e1a8)
1693

@@ -93,7 +170,7 @@ Current beta, release 2020-06-04
93170

94171
## Rust 1.43
95172

96-
Current stable, released 2020-04-23
173+
Released 2020-04-23
97174

98175
[4ee1206...204bb9b](https://github.com/rust-lang/rust-clippy/compare/4ee1206...204bb9b)
99176

@@ -1401,6 +1478,7 @@ Released 2018-09-13
14011478
[`items_after_statements`]: https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements
14021479
[`iter_cloned_collect`]: https://rust-lang.github.io/rust-clippy/master/index.html#iter_cloned_collect
14031480
[`iter_next_loop`]: https://rust-lang.github.io/rust-clippy/master/index.html#iter_next_loop
1481+
[`iter_next_slice`]: https://rust-lang.github.io/rust-clippy/master/index.html#iter_next_slice
14041482
[`iter_nth`]: https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth
14051483
[`iter_nth_zero`]: https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero
14061484
[`iter_skip_next`]: https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next
@@ -1601,9 +1679,11 @@ Released 2018-09-13
16011679
[`unnecessary_fold`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold
16021680
[`unnecessary_mut_passed`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed
16031681
[`unnecessary_operation`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_operation
1682+
[`unnecessary_sort_by`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by
16041683
[`unnecessary_unwrap`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap
16051684
[`unneeded_field_pattern`]: https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_field_pattern
16061685
[`unneeded_wildcard_pattern`]: https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_wildcard_pattern
1686+
[`unnested_or_patterns`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns
16071687
[`unreachable`]: https://rust-lang.github.io/rust-clippy/master/index.html#unreachable
16081688
[`unreadable_literal`]: https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal
16091689
[`unsafe_derive_deserialize`]: https://rust-lang.github.io/rust-clippy/master/index.html#unsafe_derive_deserialize
@@ -1630,6 +1710,7 @@ Released 2018-09-13
16301710
[`useless_transmute`]: https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
16311711
[`useless_vec`]: https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
16321712
[`vec_box`]: https://rust-lang.github.io/rust-clippy/master/index.html#vec_box
1713+
[`vec_resize_to_zero`]: https://rust-lang.github.io/rust-clippy/master/index.html#vec_resize_to_zero
16331714
[`verbose_bit_mask`]: https://rust-lang.github.io/rust-clippy/master/index.html#verbose_bit_mask
16341715
[`verbose_file_reads`]: https://rust-lang.github.io/rust-clippy/master/index.html#verbose_file_reads
16351716
[`vtable_address_comparisons`]: https://rust-lang.github.io/rust-clippy/master/index.html#vtable_address_comparisons

0 commit comments

Comments
 (0)