Skip to content

Commit cb0d40a

Browse files
committed
Merge remote-tracking branch 'upstream/master' into rustup
2 parents 8bba1b7 + cfd720d commit cb0d40a

Some content is hidden

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

56 files changed

+1077
-812
lines changed

CHANGELOG.md

Lines changed: 15 additions & 21 deletions
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)
@@ -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)*
@@ -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

@@ -1274,8 +1274,7 @@ Released 2018-09-13
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
12761276
[`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
1277+
[`blocks_in_if_conditions`]: https://rust-lang.github.io/rust-clippy/master/index.html#blocks_in_if_conditions
12791278
[`bool_comparison`]: https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison
12801279
[`borrow_interior_mutable_const`]: https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const
12811280
[`borrowed_box`]: https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box
@@ -1338,6 +1337,7 @@ Released 2018-09-13
13381337
[`excessive_precision`]: https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
13391338
[`exit`]: https://rust-lang.github.io/rust-clippy/master/index.html#exit
13401339
[`expect_fun_call`]: https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call
1340+
[`expect_used`]: https://rust-lang.github.io/rust-clippy/master/index.html#expect_used
13411341
[`expl_impl_clone_on_copy`]: https://rust-lang.github.io/rust-clippy/master/index.html#expl_impl_clone_on_copy
13421342
[`explicit_counter_loop`]: https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop
13431343
[`explicit_deref_methods`]: https://rust-lang.github.io/rust-clippy/master/index.html#explicit_deref_methods
@@ -1361,8 +1361,7 @@ Released 2018-09-13
13611361
[`fn_to_numeric_cast`]: https://rust-lang.github.io/rust-clippy/master/index.html#fn_to_numeric_cast
13621362
[`fn_to_numeric_cast_with_truncation`]: https://rust-lang.github.io/rust-clippy/master/index.html#fn_to_numeric_cast_with_truncation
13631363
[`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
1364+
[`for_loops_over_fallibles`]: https://rust-lang.github.io/rust-clippy/master/index.html#for_loops_over_fallibles
13661365
[`forget_copy`]: https://rust-lang.github.io/rust-clippy/master/index.html#forget_copy
13671366
[`forget_ref`]: https://rust-lang.github.io/rust-clippy/master/index.html#forget_ref
13681367
[`future_not_send`]: https://rust-lang.github.io/rust-clippy/master/index.html#future_not_send
@@ -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
@@ -1497,13 +1497,9 @@ Released 2018-09-13
14971497
[`option_and_then_some`]: https://rust-lang.github.io/rust-clippy/master/index.html#option_and_then_some
14981498
[`option_as_ref_deref`]: https://rust-lang.github.io/rust-clippy/master/index.html#option_as_ref_deref
14991499
[`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
15011500
[`option_map_or_none`]: https://rust-lang.github.io/rust-clippy/master/index.html#option_map_or_none
15021501
[`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
15051502
[`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
15071503
[`or_fun_call`]: https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call
15081504
[`out_of_bounds_indexing`]: https://rust-lang.github.io/rust-clippy/master/index.html#out_of_bounds_indexing
15091505
[`overflow_check_conditional`]: https://rust-lang.github.io/rust-clippy/master/index.html#overflow_check_conditional
@@ -1540,12 +1536,9 @@ Released 2018-09-13
15401536
[`regex_macro`]: https://rust-lang.github.io/rust-clippy/master/index.html#regex_macro
15411537
[`replace_consts`]: https://rust-lang.github.io/rust-clippy/master/index.html#replace_consts
15421538
[`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
15441539
[`result_map_or_into_option`]: https://rust-lang.github.io/rust-clippy/master/index.html#result_map_or_into_option
15451540
[`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
1541+
[`reversed_empty_ranges`]: https://rust-lang.github.io/rust-clippy/master/index.html#reversed_empty_ranges
15491542
[`same_functions_in_if_condition`]: https://rust-lang.github.io/rust-clippy/master/index.html#same_functions_in_if_condition
15501543
[`search_is_some`]: https://rust-lang.github.io/rust-clippy/master/index.html#search_is_some
15511544
[`serde_api_misuse`]: https://rust-lang.github.io/rust-clippy/master/index.html#serde_api_misuse
@@ -1625,6 +1618,7 @@ Released 2018-09-13
16251618
[`unused_label`]: https://rust-lang.github.io/rust-clippy/master/index.html#unused_label
16261619
[`unused_self`]: https://rust-lang.github.io/rust-clippy/master/index.html#unused_self
16271620
[`unused_unit`]: https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit
1621+
[`unwrap_used`]: https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
16281622
[`use_debug`]: https://rust-lang.github.io/rust-clippy/master/index.html#use_debug
16291623
[`use_self`]: https://rust-lang.github.io/rust-clippy/master/index.html#use_self
16301624
[`used_underscore_binding`]: https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding

clippy_lints/src/block_in_if_condition.rs renamed to clippy_lints/src/blocks_in_if_conditions.rs

Lines changed: 25 additions & 28 deletions
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

Lines changed: 1 addition & 1 deletion
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};

clippy_lints/src/comparison_chain.rs

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,23 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ComparisonChain {
8181

8282
// Check that both sets of operands are equal
8383
let mut spanless_eq = SpanlessEq::new(cx);
84-
if (!spanless_eq.eq_expr(lhs1, lhs2) || !spanless_eq.eq_expr(rhs1, rhs2))
85-
&& (!spanless_eq.eq_expr(lhs1, rhs2) || !spanless_eq.eq_expr(rhs1, lhs2))
86-
{
84+
let same_fixed_operands = spanless_eq.eq_expr(lhs1, lhs2) && spanless_eq.eq_expr(rhs1, rhs2);
85+
let same_transposed_operands = spanless_eq.eq_expr(lhs1, rhs2) && spanless_eq.eq_expr(rhs1, lhs2);
86+
87+
if !same_fixed_operands && !same_transposed_operands {
8788
return;
8889
}
8990

91+
// Check that if the operation is the same, either it's not `==` or the operands are transposed
92+
if kind1.node == kind2.node {
93+
if kind1.node == BinOpKind::Eq {
94+
return;
95+
}
96+
if !same_transposed_operands {
97+
return;
98+
}
99+
}
100+
90101
// Check that the type being compared implements `core::cmp::Ord`
91102
let ty = cx.tables.expr_ty(lhs1);
92103
let is_ord = get_trait_def_id(cx, &paths::ORD).map_or(false, |id| implements_trait(cx, ty, id, &[]));

clippy_lints/src/identity_op.rs

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
use rustc_hir::{BinOpKind, Expr, ExprKind};
1+
use if_chain::if_chain;
2+
use rustc_hir::{BinOp, BinOpKind, Expr, ExprKind};
23
use rustc_lint::{LateContext, LateLintPass};
34
use rustc_middle::ty;
45
use rustc_session::{declare_lint_pass, declare_tool_lint};
@@ -32,7 +33,10 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for IdentityOp {
3233
if e.span.from_expansion() {
3334
return;
3435
}
35-
if let ExprKind::Binary(ref cmp, ref left, ref right) = e.kind {
36+
if let ExprKind::Binary(cmp, ref left, ref right) = e.kind {
37+
if is_allowed(cx, cmp, left, right) {
38+
return;
39+
}
3640
match cmp.node {
3741
BinOpKind::Add | BinOpKind::BitOr | BinOpKind::BitXor => {
3842
check(cx, left, 0, e.span, right.span);
@@ -54,6 +58,20 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for IdentityOp {
5458
}
5559
}
5660

61+
fn is_allowed(cx: &LateContext<'_, '_>, cmp: BinOp, left: &Expr<'_>, right: &Expr<'_>) -> bool {
62+
// `1 << 0` is a common pattern in bit manipulation code
63+
if_chain! {
64+
if let BinOpKind::Shl = cmp.node;
65+
if let Some(Constant::Int(0)) = constant_simple(cx, cx.tables, right);
66+
if let Some(Constant::Int(1)) = constant_simple(cx, cx.tables, left);
67+
then {
68+
return true;
69+
}
70+
}
71+
72+
false
73+
}
74+
5775
#[allow(clippy::cast_possible_wrap)]
5876
fn check(cx: &LateContext<'_, '_>, e: &Expr<'_>, m: i8, span: Span, arg: Span) {
5977
if let Some(Constant::Int(v)) = constant_simple(cx, cx.tables, e) {

clippy_lints/src/let_if_seq.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ declare_clippy_lint! {
5050
/// };
5151
/// ```
5252
pub USELESS_LET_IF_SEQ,
53-
style,
53+
nursery,
5454
"unidiomatic `let mut` declaration followed by initialization in `if`"
5555
}
5656

0 commit comments

Comments
 (0)