about summary refs log tree commit diff
path: root/compiler/rustc_lint/src
diff options
context:
space:
mode:
authormark <markm@cs.wisc.edu>2021-02-12 18:04:37 -0600
committermark <markm@cs.wisc.edu>2021-03-05 10:10:04 -0600
commite64138c534d356e555842ddc9da20a952a20ab46 (patch)
treef89110b4a822a6cd4d4391a3c0c21099d1e4a05f /compiler/rustc_lint/src
parent5233edcf1c7ee70ac25e4ec1115c3546f53d8a2d (diff)
use pat<no_top_alt> for patterns in let bindings
Diffstat (limited to 'compiler/rustc_lint/src')
-rw-r--r--compiler/rustc_lint/src/unused.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_lint/src/unused.rs b/compiler/rustc_lint/src/unused.rs
index b611aebad01..335ceb775e8 100644
--- a/compiler/rustc_lint/src/unused.rs
+++ b/compiler/rustc_lint/src/unused.rs
@@ -847,7 +847,7 @@ impl EarlyLintPass for UnusedParens {
 
     fn check_stmt(&mut self, cx: &EarlyContext<'_>, s: &ast::Stmt) {
         if let StmtKind::Local(ref local) = s.kind {
-            self.check_unused_parens_pat(cx, &local.pat, false, false);
+            self.check_unused_parens_pat(cx, &local.pat, true, false);
         }
 
         <Self as UnusedDelimLint>::check_stmt(self, cx, s)