Skip to content

Commit 763f4f9

Browse files
committed
Merge commit 'e214ea82ad0a751563acf67e1cd9279cf302db3a' into clippyup
2 parents 94b8597 + e214ea8 commit 763f4f9

File tree

74 files changed

+1770
-1102
lines changed

Some content is hidden

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

74 files changed

+1770
-1102
lines changed

CHANGELOG.md

+19-25
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ Released 2020-03-12
198198

199199
### Suggestion Improvements
200200

201-
* [`option_map_unwrap_or`] [#4634](https://github.com/rust-lang/rust-clippy/pull/4634)
201+
* `option_map_unwrap_or` [#4634](https://github.com/rust-lang/rust-clippy/pull/4634)
202202
* [`wildcard_enum_match_arm`] [#4934](https://github.com/rust-lang/rust-clippy/pull/4934)
203203
* [`cognitive_complexity`] [#4935](https://github.com/rust-lang/rust-clippy/pull/4935)
204204
* [`decimal_literal_representation`] [#4956](https://github.com/rust-lang/rust-clippy/pull/4956)
@@ -282,8 +282,8 @@ Released 2019-12-19
282282
* [`panic`] [#4657](https://github.com/rust-lang/rust-clippy/pull/4657)
283283
* [`unreachable`] [#4657](https://github.com/rust-lang/rust-clippy/pull/4657)
284284
* [`todo`] [#4657](https://github.com/rust-lang/rust-clippy/pull/4657)
285-
* [`option_expect_used`] [#4657](https://github.com/rust-lang/rust-clippy/pull/4657)
286-
* [`result_expect_used`] [#4657](https://github.com/rust-lang/rust-clippy/pull/4657)
285+
* `option_expect_used` [#4657](https://github.com/rust-lang/rust-clippy/pull/4657)
286+
* `result_expect_used` [#4657](https://github.com/rust-lang/rust-clippy/pull/4657)
287287
* Move `redundant_clone` to perf group [#4509](https://github.com/rust-lang/rust-clippy/pull/4509)
288288
* Move `manual_mul_add` to nursery group [#4736](https://github.com/rust-lang/rust-clippy/pull/4736)
289289
* Expand `unit_cmp` to also work with `assert_eq!`, `debug_assert_eq!`, `assert_ne!` and `debug_assert_ne!` [#4613](https://github.com/rust-lang/rust-clippy/pull/4613)
@@ -315,7 +315,7 @@ Released 2019-11-07
315315
* [`missing_safety_doc`] [#4535](https://github.com/rust-lang/rust-clippy/pull/4535)
316316
* [`mem_replace_with_uninit`] [#4511](https://github.com/rust-lang/rust-clippy/pull/4511)
317317
* [`suspicious_map`] [#4394](https://github.com/rust-lang/rust-clippy/pull/4394)
318-
* [`option_and_then_some`] [#4386](https://github.com/rust-lang/rust-clippy/pull/4386)
318+
* `option_and_then_some` [#4386](https://github.com/rust-lang/rust-clippy/pull/4386)
319319
* [`manual_saturating_arithmetic`] [#4498](https://github.com/rust-lang/rust-clippy/pull/4498)
320320
* Deprecate `unused_collect` lint. This is fully covered by rustc's `#[must_use]` on `collect` [#4348](https://github.com/rust-lang/rust-clippy/pull/4348)
321321
* Move `type_repetition_in_bounds` to pedantic group [#4403](https://github.com/rust-lang/rust-clippy/pull/4403)
@@ -395,7 +395,7 @@ Released 2019-08-15
395395
* Fix false positive in [`useless_attribute`] [#4107](https://github.com/rust-lang/rust-clippy/pull/4107)
396396
* Fix incorrect suggestion for [`float_cmp`] [#4214](https://github.com/rust-lang/rust-clippy/pull/4214)
397397
* Add suggestions for [`print_with_newline`] and [`write_with_newline`] [#4136](https://github.com/rust-lang/rust-clippy/pull/4136)
398-
* Improve suggestions for [`option_map_unwrap_or_else`] and [`result_map_unwrap_or_else`] [#4164](https://github.com/rust-lang/rust-clippy/pull/4164)
398+
* Improve suggestions for `option_map_unwrap_or_else` and `result_map_unwrap_or_else` [#4164](https://github.com/rust-lang/rust-clippy/pull/4164)
399399
* Improve suggestions for [`non_ascii_literal`] [#4119](https://github.com/rust-lang/rust-clippy/pull/4119)
400400
* Improve diagnostics for [`let_and_return`] [#4137](https://github.com/rust-lang/rust-clippy/pull/4137)
401401
* Improve diagnostics for [`trivially_copy_pass_by_ref`] [#4071](https://github.com/rust-lang/rust-clippy/pull/4071)
@@ -448,7 +448,7 @@ Released 2019-05-20
448448
* Fix false positive in [`needless_range_loop`] pertaining to structs without a `.iter()`
449449
* Fix false positive in [`bool_comparison`] pertaining to non-bool types
450450
* Fix false positive in [`redundant_closure`] pertaining to differences in borrows
451-
* Fix false positive in [`option_map_unwrap_or`] on non-copy types
451+
* Fix false positive in `option_map_unwrap_or` on non-copy types
452452
* Fix false positives in [`missing_const_for_fn`] pertaining to macros and trait method impls
453453
* Fix false positive in [`needless_pass_by_value`] pertaining to procedural macros
454454
* Fix false positive in [`needless_continue`] pertaining to loop labels
@@ -794,7 +794,7 @@ Released 2018-09-13
794794

795795
## 0.0.169
796796
* Rustup to *rustc 1.23.0-nightly (3b82e4c74 2017-11-05)*
797-
* New lints: [`just_underscores_and_digits`], [`result_map_unwrap_or_else`], [`transmute_bytes_to_str`]
797+
* New lints: [`just_underscores_and_digits`], `result_map_unwrap_or_else`, [`transmute_bytes_to_str`]
798798

799799
## 0.0.168
800800
* Rustup to *rustc 1.23.0-nightly (f0fe716db 2017-10-30)*
@@ -805,7 +805,7 @@ Released 2018-09-13
805805

806806
## 0.0.166
807807
* Rustup to *rustc 1.22.0-nightly (b7960878b 2017-10-18)*
808-
* New lints: [`explicit_write`], [`identity_conversion`], [`implicit_hasher`], [`invalid_ref`], [`option_map_or_none`],
808+
* New lints: [`explicit_write`], `identity_conversion`, [`implicit_hasher`], [`invalid_ref`], [`option_map_or_none`],
809809
[`range_minus_one`], [`range_plus_one`], [`transmute_int_to_bool`], [`transmute_int_to_char`],
810810
[`transmute_int_to_float`]
811811

@@ -1068,7 +1068,7 @@ Released 2018-09-13
10681068

10691069
## 0.0.93 — 2016-10-03
10701070
* Rustup to *rustc 1.14.0-nightly (144af3e97 2016-10-02)*
1071-
* [`option_map_unwrap_or`] and [`option_map_unwrap_or_else`] are now
1071+
* `option_map_unwrap_or` and `option_map_unwrap_or_else` are now
10721072
allowed by default.
10731073
* New lint: [`explicit_into_iter_loop`]
10741074

@@ -1087,8 +1087,8 @@ Released 2018-09-13
10871087
## 0.0.88 — 2016-09-04
10881088
* Rustup to *rustc 1.13.0-nightly (70598e04f 2016-09-03)*
10891089
* The following lints are not new but were only usable through the `clippy`
1090-
lint groups: [`filter_next`], [`for_loop_over_option`],
1091-
[`for_loop_over_result`] and [`match_overlapping_arm`]. You should now be
1090+
lint groups: [`filter_next`], `for_loop_over_option`,
1091+
`for_loop_over_result` and [`match_overlapping_arm`]. You should now be
10921092
able to `#[allow/deny]` them individually and they are available directly
10931093
through `cargo clippy`.
10941094

@@ -1273,9 +1273,9 @@ Released 2018-09-13
12731273
[`assign_ops`]: https://rust-lang.github.io/rust-clippy/master/index.html#assign_ops
12741274
[`await_holding_lock`]: https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_lock
12751275
[`bad_bit_mask`]: https://rust-lang.github.io/rust-clippy/master/index.html#bad_bit_mask
1276+
[`bind_instead_of_map`]: https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
12761277
[`blacklisted_name`]: https://rust-lang.github.io/rust-clippy/master/index.html#blacklisted_name
1277-
[`block_in_if_condition_expr`]: https://rust-lang.github.io/rust-clippy/master/index.html#block_in_if_condition_expr
1278-
[`block_in_if_condition_stmt`]: https://rust-lang.github.io/rust-clippy/master/index.html#block_in_if_condition_stmt
1278+
[`blocks_in_if_conditions`]: https://rust-lang.github.io/rust-clippy/master/index.html#blocks_in_if_conditions
12791279
[`bool_comparison`]: https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison
12801280
[`borrow_interior_mutable_const`]: https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const
12811281
[`borrowed_box`]: https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box
@@ -1338,6 +1338,7 @@ Released 2018-09-13
13381338
[`excessive_precision`]: https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
13391339
[`exit`]: https://rust-lang.github.io/rust-clippy/master/index.html#exit
13401340
[`expect_fun_call`]: https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call
1341+
[`expect_used`]: https://rust-lang.github.io/rust-clippy/master/index.html#expect_used
13411342
[`expl_impl_clone_on_copy`]: https://rust-lang.github.io/rust-clippy/master/index.html#expl_impl_clone_on_copy
13421343
[`explicit_counter_loop`]: https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop
13431344
[`explicit_deref_methods`]: https://rust-lang.github.io/rust-clippy/master/index.html#explicit_deref_methods
@@ -1361,14 +1362,12 @@ Released 2018-09-13
13611362
[`fn_to_numeric_cast`]: https://rust-lang.github.io/rust-clippy/master/index.html#fn_to_numeric_cast
13621363
[`fn_to_numeric_cast_with_truncation`]: https://rust-lang.github.io/rust-clippy/master/index.html#fn_to_numeric_cast_with_truncation
13631364
[`for_kv_map`]: https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map
1364-
[`for_loop_over_option`]: https://rust-lang.github.io/rust-clippy/master/index.html#for_loop_over_option
1365-
[`for_loop_over_result`]: https://rust-lang.github.io/rust-clippy/master/index.html#for_loop_over_result
1365+
[`for_loops_over_fallibles`]: https://rust-lang.github.io/rust-clippy/master/index.html#for_loops_over_fallibles
13661366
[`forget_copy`]: https://rust-lang.github.io/rust-clippy/master/index.html#forget_copy
13671367
[`forget_ref`]: https://rust-lang.github.io/rust-clippy/master/index.html#forget_ref
13681368
[`future_not_send`]: https://rust-lang.github.io/rust-clippy/master/index.html#future_not_send
13691369
[`get_last_with_len`]: https://rust-lang.github.io/rust-clippy/master/index.html#get_last_with_len
13701370
[`get_unwrap`]: https://rust-lang.github.io/rust-clippy/master/index.html#get_unwrap
1371-
[`identity_conversion`]: https://rust-lang.github.io/rust-clippy/master/index.html#identity_conversion
13721371
[`identity_op`]: https://rust-lang.github.io/rust-clippy/master/index.html#identity_op
13731372
[`if_let_mutex`]: https://rust-lang.github.io/rust-clippy/master/index.html#if_let_mutex
13741373
[`if_let_redundant_pattern_matching`]: https://rust-lang.github.io/rust-clippy/master/index.html#if_let_redundant_pattern_matching
@@ -1431,6 +1430,7 @@ Released 2018-09-13
14311430
[`map_clone`]: https://rust-lang.github.io/rust-clippy/master/index.html#map_clone
14321431
[`map_entry`]: https://rust-lang.github.io/rust-clippy/master/index.html#map_entry
14331432
[`map_flatten`]: https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten
1433+
[`map_unwrap_or`]: https://rust-lang.github.io/rust-clippy/master/index.html#map_unwrap_or
14341434
[`match_as_ref`]: https://rust-lang.github.io/rust-clippy/master/index.html#match_as_ref
14351435
[`match_bool`]: https://rust-lang.github.io/rust-clippy/master/index.html#match_bool
14361436
[`match_on_vec_items`]: https://rust-lang.github.io/rust-clippy/master/index.html#match_on_vec_items
@@ -1494,16 +1494,11 @@ Released 2018-09-13
14941494
[`not_unsafe_ptr_arg_deref`]: https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref
14951495
[`ok_expect`]: https://rust-lang.github.io/rust-clippy/master/index.html#ok_expect
14961496
[`op_ref`]: https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
1497-
[`option_and_then_some`]: https://rust-lang.github.io/rust-clippy/master/index.html#option_and_then_some
14981497
[`option_as_ref_deref`]: https://rust-lang.github.io/rust-clippy/master/index.html#option_as_ref_deref
14991498
[`option_env_unwrap`]: https://rust-lang.github.io/rust-clippy/master/index.html#option_env_unwrap
1500-
[`option_expect_used`]: https://rust-lang.github.io/rust-clippy/master/index.html#option_expect_used
15011499
[`option_map_or_none`]: https://rust-lang.github.io/rust-clippy/master/index.html#option_map_or_none
15021500
[`option_map_unit_fn`]: https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn
1503-
[`option_map_unwrap_or`]: https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unwrap_or
1504-
[`option_map_unwrap_or_else`]: https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unwrap_or_else
15051501
[`option_option`]: https://rust-lang.github.io/rust-clippy/master/index.html#option_option
1506-
[`option_unwrap_used`]: https://rust-lang.github.io/rust-clippy/master/index.html#option_unwrap_used
15071502
[`or_fun_call`]: https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call
15081503
[`out_of_bounds_indexing`]: https://rust-lang.github.io/rust-clippy/master/index.html#out_of_bounds_indexing
15091504
[`overflow_check_conditional`]: https://rust-lang.github.io/rust-clippy/master/index.html#overflow_check_conditional
@@ -1540,12 +1535,9 @@ Released 2018-09-13
15401535
[`regex_macro`]: https://rust-lang.github.io/rust-clippy/master/index.html#regex_macro
15411536
[`replace_consts`]: https://rust-lang.github.io/rust-clippy/master/index.html#replace_consts
15421537
[`rest_pat_in_fully_bound_structs`]: https://rust-lang.github.io/rust-clippy/master/index.html#rest_pat_in_fully_bound_structs
1543-
[`result_expect_used`]: https://rust-lang.github.io/rust-clippy/master/index.html#result_expect_used
15441538
[`result_map_or_into_option`]: https://rust-lang.github.io/rust-clippy/master/index.html#result_map_or_into_option
15451539
[`result_map_unit_fn`]: https://rust-lang.github.io/rust-clippy/master/index.html#result_map_unit_fn
1546-
[`result_map_unwrap_or_else`]: https://rust-lang.github.io/rust-clippy/master/index.html#result_map_unwrap_or_else
1547-
[`result_unwrap_used`]: https://rust-lang.github.io/rust-clippy/master/index.html#result_unwrap_used
1548-
[`reverse_range_loop`]: https://rust-lang.github.io/rust-clippy/master/index.html#reverse_range_loop
1540+
[`reversed_empty_ranges`]: https://rust-lang.github.io/rust-clippy/master/index.html#reversed_empty_ranges
15491541
[`same_functions_in_if_condition`]: https://rust-lang.github.io/rust-clippy/master/index.html#same_functions_in_if_condition
15501542
[`search_is_some`]: https://rust-lang.github.io/rust-clippy/master/index.html#search_is_some
15511543
[`serde_api_misuse`]: https://rust-lang.github.io/rust-clippy/master/index.html#serde_api_misuse
@@ -1625,11 +1617,13 @@ Released 2018-09-13
16251617
[`unused_label`]: https://rust-lang.github.io/rust-clippy/master/index.html#unused_label
16261618
[`unused_self`]: https://rust-lang.github.io/rust-clippy/master/index.html#unused_self
16271619
[`unused_unit`]: https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit
1620+
[`unwrap_used`]: https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
16281621
[`use_debug`]: https://rust-lang.github.io/rust-clippy/master/index.html#use_debug
16291622
[`use_self`]: https://rust-lang.github.io/rust-clippy/master/index.html#use_self
16301623
[`used_underscore_binding`]: https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
16311624
[`useless_asref`]: https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref
16321625
[`useless_attribute`]: https://rust-lang.github.io/rust-clippy/master/index.html#useless_attribute
1626+
[`useless_conversion`]: https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
16331627
[`useless_format`]: https://rust-lang.github.io/rust-clippy/master/index.html#useless_format
16341628
[`useless_let_if_seq`]: https://rust-lang.github.io/rust-clippy/master/index.html#useless_let_if_seq
16351629
[`useless_transmute`]: https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute

clippy_lints/src/block_in_if_condition.rs clippy_lints/src/blocks_in_if_conditions.rs

+25-28
Original file line numberDiff line numberDiff line change
@@ -8,43 +8,40 @@ use rustc_middle::lint::in_external_macro;
88
use rustc_session::{declare_lint_pass, declare_tool_lint};
99

1010
declare_clippy_lint! {
11-
/// **What it does:** Checks for `if` conditions that use blocks to contain an
12-
/// expression.
11+
/// **What it does:** Checks for `if` conditions that use blocks containing an
12+
/// expression, statements or conditions that use closures with blocks.
1313
///
14-
/// **Why is this bad?** It isn't really Rust style, same as using parentheses
15-
/// to contain expressions.
14+
/// **Why is this bad?** Style, using blocks in the condition makes it hard to read.
1615
///
1716
/// **Known problems:** None.
1817
///
19-
/// **Example:**
18+
/// **Examples:**
2019
/// ```rust
20+
/// // Bad
2121
/// if { true } { /* ... */ }
22+
///
23+
/// // Good
24+
/// if true { /* ... */ }
2225
/// ```
23-
pub BLOCK_IN_IF_CONDITION_EXPR,
24-
style,
25-
"braces that can be eliminated in conditions, e.g., `if { true } ...`"
26-
}
27-
28-
declare_clippy_lint! {
29-
/// **What it does:** Checks for `if` conditions that use blocks containing
30-
/// statements, or conditions that use closures with blocks.
3126
///
32-
/// **Why is this bad?** Using blocks in the condition makes it hard to read.
27+
/// // or
3328
///
34-
/// **Known problems:** None.
29+
/// ```rust
30+
/// # fn somefunc() -> bool { true };
3531
///
36-
/// **Example:**
37-
/// ```rust,ignore
38-
/// if { let x = somefunc(); x } {}
39-
/// // or
40-
/// if somefunc(|x| { x == 47 }) {}
32+
/// // Bad
33+
/// if { let x = somefunc(); x } { /* ... */ }
34+
///
35+
/// // Good
36+
/// let res = { let x = somefunc(); x };
37+
/// if res { /* ... */ }
4138
/// ```
42-
pub BLOCK_IN_IF_CONDITION_STMT,
39+
pub BLOCKS_IN_IF_CONDITIONS,
4340
style,
44-
"complex blocks in conditions, e.g., `if { let x = true; x } ...`"
41+
"useless or complex blocks that can be eliminated in conditions"
4542
}
4643

47-
declare_lint_pass!(BlockInIfCondition => [BLOCK_IN_IF_CONDITION_EXPR, BLOCK_IN_IF_CONDITION_STMT]);
44+
declare_lint_pass!(BlocksInIfConditions => [BLOCKS_IN_IF_CONDITIONS]);
4845

4946
struct ExVisitor<'a, 'tcx> {
5047
found_block: Option<&'tcx Expr<'tcx>>,
@@ -72,9 +69,9 @@ impl<'a, 'tcx> Visitor<'tcx> for ExVisitor<'a, 'tcx> {
7269

7370
const BRACED_EXPR_MESSAGE: &str = "omit braces around single expression condition";
7471
const COMPLEX_BLOCK_MESSAGE: &str = "in an `if` condition, avoid complex blocks or closures with blocks; \
75-
instead, move the block or closure higher and bind it with a `let`";
72+
instead, move the block or closure higher and bind it with a `let`";
7673

77-
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for BlockInIfCondition {
74+
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for BlocksInIfConditions {
7875
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr<'_>) {
7976
if in_external_macro(cx.sess(), expr.span) {
8077
return;
@@ -92,7 +89,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for BlockInIfCondition {
9289
let mut applicability = Applicability::MachineApplicable;
9390
span_lint_and_sugg(
9491
cx,
95-
BLOCK_IN_IF_CONDITION_EXPR,
92+
BLOCKS_IN_IF_CONDITIONS,
9693
cond.span,
9794
BRACED_EXPR_MESSAGE,
9895
"try",
@@ -118,7 +115,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for BlockInIfCondition {
118115
let mut applicability = Applicability::MachineApplicable;
119116
span_lint_and_sugg(
120117
cx,
121-
BLOCK_IN_IF_CONDITION_STMT,
118+
BLOCKS_IN_IF_CONDITIONS,
122119
expr.span.with_hi(cond.span.hi()),
123120
COMPLEX_BLOCK_MESSAGE,
124121
"try",
@@ -140,7 +137,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for BlockInIfCondition {
140137
let mut visitor = ExVisitor { found_block: None, cx };
141138
walk_expr(&mut visitor, cond);
142139
if let Some(block) = visitor.found_block {
143-
span_lint(cx, BLOCK_IN_IF_CONDITION_STMT, block.span, COMPLEX_BLOCK_MESSAGE);
140+
span_lint(cx, BLOCKS_IN_IF_CONDITIONS, block.span, COMPLEX_BLOCK_MESSAGE);
144141
}
145142
}
146143
}

clippy_lints/src/bytecount.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use crate::utils::{
33
span_lint_and_sugg, walk_ptrs_ty,
44
};
55
use if_chain::if_chain;
6-
use rustc_ast::ast::{UintTy};
6+
use rustc_ast::ast::UintTy;
77
use rustc_errors::Applicability;
88
use rustc_hir::{BinOpKind, BorrowKind, Expr, ExprKind, UnOp};
99
use rustc_lint::{LateContext, LateLintPass};

0 commit comments

Comments
 (0)