diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-11-04 06:40:31 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-04 06:40:31 +0100 |
| commit | 14fdfcb38c45a563c710fa3397a2f2f3e2b6f3a4 (patch) | |
| tree | 13bc3b60d0d44aaf8ad5e0fbe93c9041b5513fff | |
| parent | a5efeb3ea766e41068f3c8b6c61b7bb73b8bcf5d (diff) | |
| parent | ba18f16e81e568a6dfbd437edf4c949a9538c984 (diff) | |
| download | rust-14fdfcb38c45a563c710fa3397a2f2f3e2b6f3a4.tar.gz rust-14fdfcb38c45a563c710fa3397a2f2f3e2b6f3a4.zip | |
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`
| -rw-r--r-- | compiler/rustc_hir/src/intravisit.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_hir/src/intravisit.rs b/compiler/rustc_hir/src/intravisit.rs index d852893ad5d..3ef58d7d705 100644 --- a/compiler/rustc_hir/src/intravisit.rs +++ b/compiler/rustc_hir/src/intravisit.rs @@ -358,6 +358,9 @@ pub trait Visitor<'v>: Sized { fn visit_where_predicate(&mut self, predicate: &'v WherePredicate<'v>) { walk_where_predicate(self, predicate) } + fn visit_fn_ret_ty(&mut self, ret_ty: &'v FnRetTy<'v>) { + walk_fn_ret_ty(self, ret_ty) + } fn visit_fn_decl(&mut self, fd: &'v FnDecl<'v>) { walk_fn_decl(self, fd) } @@ -903,7 +906,7 @@ pub fn walk_fn_decl<'v, V: Visitor<'v>>(visitor: &mut V, function_declaration: & for ty in function_declaration.inputs { visitor.visit_ty(ty) } - walk_fn_ret_ty(visitor, &function_declaration.output) + visitor.visit_fn_ret_ty(&function_declaration.output) } pub fn walk_fn_ret_ty<'v, V: Visitor<'v>>(visitor: &mut V, ret_ty: &'v FnRetTy<'v>) { |
