Allow AST and HIR visitors to return ControlFlow

This commit is contained in:
Jason Newcomb
2024-02-18 03:12:44 -05:00
parent 1f8e824f11
commit 864cee3ea3
6 changed files with 958 additions and 768 deletions

View File

@@ -96,7 +96,7 @@ impl Annotatable {
}
}
pub fn visit_with<'a, V: Visitor<'a>>(&'a self, visitor: &mut V) {
pub fn visit_with<'a, V: Visitor<'a>>(&'a self, visitor: &mut V) -> V::Result {
match self {
Annotatable::Item(item) => visitor.visit_item(item),
Annotatable::TraitItem(item) => visitor.visit_assoc_item(item, AssocCtxt::Trait),