diff --git a/gcc/rust/resolve/rust-default-resolver.cc b/gcc/rust/resolve/rust-default-resolver.cc index e2609d13c9a..d805bc9a511 100644 --- a/gcc/rust/resolve/rust-default-resolver.cc +++ b/gcc/rust/resolve/rust-default-resolver.cc @@ -79,6 +79,9 @@ DefaultResolver::visit (AST::Function &function) } } + if (function.has_return_type ()) + visit (function.get_return_type ()); + if (function.has_body ()) function.get_definition ().value ()->accept_vis (*this); };