Rename BindingAnnotation to BindingMode

This commit is contained in:
Jules Bertholet 2024-04-16 19:23:30 -04:00
parent d19e48d79a
commit 2a4624ddd1
No known key found for this signature in database
GPG key ID: 32034DAFC38C1BFC
81 changed files with 222 additions and 256 deletions

View file

@ -1056,7 +1056,7 @@ impl UnusedParens {
avoid_mut: bool,
keep_space: (bool, bool),
) {
use ast::{BindingAnnotation, PatKind};
use ast::{BindingMode, PatKind};
if let PatKind::Paren(inner) = &value.kind {
match inner.kind {
@ -1068,7 +1068,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(BindingAnnotation::MUT, ..) if avoid_mut => {
PatKind::Ident(BindingMode::MUT, ..) if avoid_mut => {
return;
}
// Otherwise proceed with linting.