diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-12-19 10:42:07 +0100 |
|---|---|---|
| committer | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-12-20 22:22:44 +0100 |
| commit | a7641f1fcc90ec7596c859bc0faff533a9fb33d2 (patch) | |
| tree | b7ac45d81e5ee276a13bac2838a41e3602cf596f | |
| parent | a7aec3f207fb40f0c4c857fb91a03372ac8bcd69 (diff) | |
| download | rust-a7641f1fcc90ec7596c859bc0faff533a9fb33d2.tar.gz rust-a7641f1fcc90ec7596c859bc0faff533a9fb33d2.zip | |
address review comments
| -rw-r--r-- | src/librustc_lint/unused.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_lint/unused.rs b/src/librustc_lint/unused.rs index e030954b011..06ec3f38009 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. _ => {} } |
