Skip to content

Commit

Permalink
Update trait name from Noop -> Walk
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Jul 22, 2024
1 parent 8d29005 commit 91b26fc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions compiler/rustc_ast/src/mut_visit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ impl<A: Array> ExpectOne<A> for SmallVec<A> {
}
}

pub trait NoopVisitItemKind {
pub trait WalkItemKind {
fn walk(
&mut self,
ctxt: Option<AssocCtxt>,
Expand Down Expand Up @@ -1090,7 +1090,7 @@ pub fn walk_block<T: MutVisitor>(vis: &mut T, block: &mut P<Block>) {
}

pub fn walk_item_kind(
kind: &mut impl NoopVisitItemKind,
kind: &mut impl WalkItemKind,
ident: Ident,
span: Span,
id: NodeId,
Expand All @@ -1099,7 +1099,7 @@ pub fn walk_item_kind(
kind.walk(None, ident, span, id, vis)
}

impl NoopVisitItemKind for ItemKind {
impl WalkItemKind for ItemKind {
fn walk(
&mut self,
ctxt: Option<AssocCtxt>,
Expand Down Expand Up @@ -1219,7 +1219,7 @@ impl NoopVisitItemKind for ItemKind {
}
}

impl NoopVisitItemKind for AssocItemKind {
impl WalkItemKind for AssocItemKind {
fn walk(
&mut self,
ctxt: Option<AssocCtxt>,
Expand Down Expand Up @@ -1320,7 +1320,7 @@ pub fn walk_crate<T: MutVisitor>(vis: &mut T, krate: &mut Crate) {
}

/// Mutates one item, returning the item again.
pub fn walk_flat_map_item<K: NoopVisitItemKind>(
pub fn walk_flat_map_item<K: WalkItemKind>(
visitor: &mut impl MutVisitor,
mut item: P<Item<K>>,
ctxt: Option<AssocCtxt>,
Expand All @@ -1336,7 +1336,7 @@ pub fn walk_flat_map_item<K: NoopVisitItemKind>(
smallvec![item]
}

impl NoopVisitItemKind for ForeignItemKind {
impl WalkItemKind for ForeignItemKind {
fn walk(
&mut self,
ctxt: Option<AssocCtxt>,
Expand Down

0 comments on commit 91b26fc

Please sign in to comment.