From a7641f1fcc90ec7596c859bc0faff533a9fb33d2 Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Thu, 19 Dec 2019 10:42:07 +0100 Subject: [PATCH] address review comments --- src/librustc_lint/unused.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/librustc_lint/unused.rs b/src/librustc_lint/unused.rs index e030954b011c..06ec3f380091 100644 --- a/src/librustc_lint/unused.rs +++ b/src/librustc_lint/unused.rs @@ -392,7 +392,7 @@ impl UnusedParens { avoid_or: bool, avoid_mut: bool, ) { - use ast::{PatKind, BindingMode::ByValue, Mutability::Mut}; + use ast::{PatKind, BindingMode, Mutability}; if let PatKind::Paren(inner) = &value.kind { match inner.kind { @@ -404,7 +404,7 @@ impl UnusedParens { // Avoid `p0 | .. | pn` if we should. PatKind::Or(..) if avoid_or => return, // Avoid `mut x` and `mut x @ p` if we should: - PatKind::Ident(ByValue(Mut), ..) if avoid_mut => return, + PatKind::Ident(BindingMode::ByValue(Mutability::Mut), ..) if avoid_mut => return, // Otherwise proceed with linting. _ => {} }