Sync mut_visit
function names with immut visit
ones (s/noop_visit/walk/)
This commit is contained in:
parent
6f85f20520
commit
754bdef793
9 changed files with 226 additions and 235 deletions
|
@ -10,7 +10,7 @@ use super::{
|
|||
|
||||
use crate::errors;
|
||||
use crate::maybe_recover_from_interpolated_ty_qpath;
|
||||
use ast::mut_visit::{noop_visit_expr, MutVisitor};
|
||||
use ast::mut_visit::{self, MutVisitor};
|
||||
use ast::token::IdentIsRaw;
|
||||
use ast::{CoroutineKind, ForLoopKind, GenBlockKind, MatchKind, Pat, Path, PathSegment, Recovered};
|
||||
use core::mem;
|
||||
|
@ -3939,14 +3939,14 @@ impl MutVisitor for CondChecker<'_> {
|
|||
}
|
||||
}
|
||||
ExprKind::Binary(Spanned { node: BinOpKind::And, .. }, _, _) => {
|
||||
noop_visit_expr(e, self);
|
||||
mut_visit::walk_expr(e, self);
|
||||
}
|
||||
ExprKind::Binary(Spanned { node: BinOpKind::Or, span: or_span }, _, _)
|
||||
if let None | Some(NotSupportedOr(_)) = self.forbid_let_reason =>
|
||||
{
|
||||
let forbid_let_reason = self.forbid_let_reason;
|
||||
self.forbid_let_reason = Some(NotSupportedOr(or_span));
|
||||
noop_visit_expr(e, self);
|
||||
mut_visit::walk_expr(e, self);
|
||||
self.forbid_let_reason = forbid_let_reason;
|
||||
}
|
||||
ExprKind::Paren(ref inner)
|
||||
|
@ -3954,7 +3954,7 @@ impl MutVisitor for CondChecker<'_> {
|
|||
{
|
||||
let forbid_let_reason = self.forbid_let_reason;
|
||||
self.forbid_let_reason = Some(NotSupportedParentheses(inner.span));
|
||||
noop_visit_expr(e, self);
|
||||
mut_visit::walk_expr(e, self);
|
||||
self.forbid_let_reason = forbid_let_reason;
|
||||
}
|
||||
ExprKind::Assign(ref lhs, _, span) => {
|
||||
|
@ -3972,7 +3972,7 @@ impl MutVisitor for CondChecker<'_> {
|
|||
}
|
||||
let comparison = self.comparison;
|
||||
self.comparison = Some(errors::MaybeComparison { span: span.shrink_to_hi() });
|
||||
noop_visit_expr(e, self);
|
||||
mut_visit::walk_expr(e, self);
|
||||
self.forbid_let_reason = forbid_let_reason;
|
||||
self.missing_let = missing_let;
|
||||
self.comparison = comparison;
|
||||
|
@ -3992,7 +3992,7 @@ impl MutVisitor for CondChecker<'_> {
|
|||
| ExprKind::Paren(_) => {
|
||||
let forbid_let_reason = self.forbid_let_reason;
|
||||
self.forbid_let_reason = Some(OtherForbidden);
|
||||
noop_visit_expr(e, self);
|
||||
mut_visit::walk_expr(e, self);
|
||||
self.forbid_let_reason = forbid_let_reason;
|
||||
}
|
||||
ExprKind::Cast(ref mut op, _) | ExprKind::Type(ref mut op, _) => {
|
||||
|
|
|
@ -12,7 +12,7 @@ use crate::errors::{
|
|||
};
|
||||
use crate::parser::expr::{could_be_unclosed_char_literal, LhsExpr};
|
||||
use crate::{maybe_recover_from_interpolated_ty_qpath, maybe_whole};
|
||||
use rustc_ast::mut_visit::{noop_visit_pat, MutVisitor};
|
||||
use rustc_ast::mut_visit::{walk_pat, MutVisitor};
|
||||
use rustc_ast::ptr::P;
|
||||
use rustc_ast::token::{self, BinOpToken, Delimiter, Token};
|
||||
use rustc_ast::{
|
||||
|
@ -810,7 +810,7 @@ impl<'a> Parser<'a> {
|
|||
self.0 = true;
|
||||
*m = Mutability::Mut;
|
||||
}
|
||||
noop_visit_pat(pat, self);
|
||||
walk_pat(pat, self);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue