Skip to content

Commit c4e8eef

Browse files
committed
add note about update-all-refs script, revert redundant pat to master
1 parent f34d1b0 commit c4e8eef

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

clippy_lints/src/if_let_mutex.rs

+4-8
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,10 @@ impl LateLintPass<'_, '_> for IfLetMutex {
6464
}
6565

6666
fn matching_arm(arm: &Arm<'_>, op: &Expr<'_>, ex: &Expr<'_>, cx: &LateContext<'_, '_>) -> bool {
67-
if_chain! {
68-
if let ExprKind::Block(ref block, _l) = arm.body.kind;
69-
if block.stmts.iter().any(|stmt| matching_stmt(stmt, op, ex, cx));
70-
then {
71-
true
72-
} else {
73-
false
74-
}
67+
if let ExprKind::Block(ref block, _l) = arm.body.kind {
68+
block.stmts.iter().any(|stmt| matching_stmt(stmt, op, ex, cx))
69+
} else {
70+
false
7571
}
7672
}
7773

doc/adding_lints.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ Once we are satisfied with the output, we need to run
101101
Please note that, we should run `TESTNAME=foo_functions cargo uitest`
102102
every time before running `tests/ui/update-all-references.sh`.
103103
Running `TESTNAME=foo_functions cargo uitest` should pass then. When we commit
104-
our lint, we need to commit the generated `.stderr` files, too.
104+
our lint, we need to commit the generated `.stderr` files, too. In general you
105+
should only run `tests/ui/update-all-references.sh` for the specific lint you are
106+
creating/editing.
105107

106108
## Rustfix tests
107109

tests/ui/redundant_pattern_matching.rs

-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ fn main() {
6464

6565
let _ = does_something();
6666
let _ = returns_unit();
67-
let _ = issue_5271();
6867

6968
let opt = Some(false);
7069
let x = if let Some(_) = opt { true } else { false };

0 commit comments

Comments
 (0)