Add let-else to AST

This commit is contained in:
Cameron Steffen 2021-06-22 13:00:58 -05:00
parent 6f388bb369
commit 89d2600d01
10 changed files with 92 additions and 26 deletions

View file

@ -618,7 +618,7 @@ trait UnusedDelimLint {
fn check_stmt(&mut self, cx: &EarlyContext<'_>, s: &ast::Stmt) {
match s.kind {
StmtKind::Local(ref local) if Self::LINT_EXPR_IN_PATTERN_MATCHING_CTX => {
if let Some(ref value) = local.init {
if let Some(value) = local.kind.init() {
self.check_unused_delims_expr(
cx,
&value,