Skip to content

Commit 14fdfcb

Browse files
authored
Rollup merge of #103884 - spastorino:visit-fn-ret-ty-intravisit, r=compiler-errors
Add visit_fn_ret_ty to hir intravisit I'm working on some RPITIT changes and I need to specialize `visit_fn_ret_ty` in my visitor impl. So I guess it's better to land it separately. r? `@compiler-errors`
2 parents a5efeb3 + ba18f16 commit 14fdfcb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

compiler/rustc_hir/src/intravisit.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,9 @@ pub trait Visitor<'v>: Sized {
358358
fn visit_where_predicate(&mut self, predicate: &'v WherePredicate<'v>) {
359359
walk_where_predicate(self, predicate)
360360
}
361+
fn visit_fn_ret_ty(&mut self, ret_ty: &'v FnRetTy<'v>) {
362+
walk_fn_ret_ty(self, ret_ty)
363+
}
361364
fn visit_fn_decl(&mut self, fd: &'v FnDecl<'v>) {
362365
walk_fn_decl(self, fd)
363366
}
@@ -903,7 +906,7 @@ pub fn walk_fn_decl<'v, V: Visitor<'v>>(visitor: &mut V, function_declaration: &
903906
for ty in function_declaration.inputs {
904907
visitor.visit_ty(ty)
905908
}
906-
walk_fn_ret_ty(visitor, &function_declaration.output)
909+
visitor.visit_fn_ret_ty(&function_declaration.output)
907910
}
908911

909912
pub fn walk_fn_ret_ty<'v, V: Visitor<'v>>(visitor: &mut V, ret_ty: &'v FnRetTy<'v>) {

0 commit comments

Comments
 (0)