From 73e6a3b5d6ad5cc816045ca000e4b700cfa68160 Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Patry Date: Wed, 24 Jan 2024 16:47:50 +0100 Subject: gccrs: Visit function return type in default resolver Function return type was not properly visited in the default resolver visitor pattern. gcc/rust/ChangeLog: * resolve/rust-default-resolver.cc (DefaultResolver::visit): Visit function return type. Signed-off-by: Pierre-Emmanuel Patry --- gcc/rust/resolve/rust-default-resolver.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gcc') diff --git a/gcc/rust/resolve/rust-default-resolver.cc b/gcc/rust/resolve/rust-default-resolver.cc index e2609d1..d805bc9 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); }; -- cgit v1.1