add note about update-all-refs script, revert redundant pat to master

This commit is contained in:
Devin R 2020-03-18 15:28:57 -04:00
parent 51c2325dd7
commit fca3537fa3
3 changed files with 7 additions and 10 deletions

View File

@ -64,14 +64,10 @@ impl LateLintPass<'_, '_> for IfLetMutex {
}
fn matching_arm(arm: &Arm<'_>, op: &Expr<'_>, ex: &Expr<'_>, cx: &LateContext<'_, '_>) -> bool {
if_chain! {
if let ExprKind::Block(ref block, _l) = arm.body.kind;
if block.stmts.iter().any(|stmt| matching_stmt(stmt, op, ex, cx));
then {
true
} else {
false
}
if let ExprKind::Block(ref block, _l) = arm.body.kind {
block.stmts.iter().any(|stmt| matching_stmt(stmt, op, ex, cx))
} else {
false
}
}

View File

@ -101,7 +101,9 @@ Once we are satisfied with the output, we need to run
Please note that, we should run `TESTNAME=foo_functions cargo uitest`
every time before running `tests/ui/update-all-references.sh`.
Running `TESTNAME=foo_functions cargo uitest` should pass then. When we commit
our lint, we need to commit the generated `.stderr` files, too.
our lint, we need to commit the generated `.stderr` files, too. In general you
should only run `tests/ui/update-all-references.sh` for the specific lint you are
creating/editing.
## Rustfix tests

View File

@ -85,7 +85,6 @@ fn main() {
let _ = does_something();
let _ = returns_unit();
let _ = issue_5271();
let opt = Some(false);
let x = if let Some(_) = opt { true } else { false };