Add WalkItemKind::Ctxt so AssocCtxt is not sent to non-Assoc ItemKinds
This commit is contained in:
parent
1236656319
commit
6180173612
7 changed files with 35 additions and 27 deletions
|
@ -1303,7 +1303,7 @@ impl InvocationCollectorNode for AstNodeWrapper<P<ast::AssocItem>, TraitItemTag>
|
|||
fragment.make_trait_items()
|
||||
}
|
||||
fn walk_flat_map<V: MutVisitor>(self, visitor: &mut V) -> Self::OutputTy {
|
||||
walk_flat_map_item(visitor, self.wrapped)
|
||||
walk_flat_map_assoc_item(visitor, self.wrapped, AssocCtxt::Trait)
|
||||
}
|
||||
fn is_mac_call(&self) -> bool {
|
||||
matches!(self.wrapped.kind, AssocItemKind::MacCall(..))
|
||||
|
@ -1344,7 +1344,7 @@ impl InvocationCollectorNode for AstNodeWrapper<P<ast::AssocItem>, ImplItemTag>
|
|||
fragment.make_impl_items()
|
||||
}
|
||||
fn walk_flat_map<V: MutVisitor>(self, visitor: &mut V) -> Self::OutputTy {
|
||||
walk_flat_map_item(visitor, self.wrapped)
|
||||
walk_flat_map_assoc_item(visitor, self.wrapped, AssocCtxt::Impl)
|
||||
}
|
||||
fn is_mac_call(&self) -> bool {
|
||||
matches!(self.wrapped.kind, AssocItemKind::MacCall(..))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue