Parse a pattern with no arm
This commit is contained in:
@@ -1113,15 +1113,17 @@ impl EarlyLintPass for UnusedParens {
|
||||
}
|
||||
ExprKind::Match(ref _expr, ref arm) => {
|
||||
for a in arm {
|
||||
self.check_unused_delims_expr(
|
||||
cx,
|
||||
&a.body,
|
||||
UnusedDelimsCtx::MatchArmExpr,
|
||||
false,
|
||||
None,
|
||||
None,
|
||||
true,
|
||||
);
|
||||
if let Some(body) = &a.body {
|
||||
self.check_unused_delims_expr(
|
||||
cx,
|
||||
body,
|
||||
UnusedDelimsCtx::MatchArmExpr,
|
||||
false,
|
||||
None,
|
||||
None,
|
||||
true,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
|
||||
Reference in New Issue
Block a user