We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a7aec3f commit a7641f1Copy full SHA for a7641f1
src/librustc_lint/unused.rs
@@ -392,7 +392,7 @@ impl UnusedParens {
392
avoid_or: bool,
393
avoid_mut: bool,
394
) {
395
- use ast::{PatKind, BindingMode::ByValue, Mutability::Mut};
+ use ast::{PatKind, BindingMode, Mutability};
396
397
if let PatKind::Paren(inner) = &value.kind {
398
match inner.kind {
@@ -404,7 +404,7 @@ impl UnusedParens {
404
// Avoid `p0 | .. | pn` if we should.
405
PatKind::Or(..) if avoid_or => return,
406
// Avoid `mut x` and `mut x @ p` if we should:
407
- PatKind::Ident(ByValue(Mut), ..) if avoid_mut => return,
+ PatKind::Ident(BindingMode::ByValue(Mutability::Mut), ..) if avoid_mut => return,
408
// Otherwise proceed with linting.
409
_ => {}
410
}
0 commit comments