public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] Visit function return type in default resolver
@ 2024-05-07 16:27 Thomas Schwinge
  0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2024-05-07 16:27 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:e84d67febe5805675d3f86e0e535702dfe67b78d

commit e84d67febe5805675d3f86e0e535702dfe67b78d
Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Date:   Wed Jan 24 16:47:50 2024 +0100

    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 <pierre-emmanuel.patry@embecosm.com>

Diff:
---
 gcc/rust/resolve/rust-default-resolver.cc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gcc/rust/resolve/rust-default-resolver.cc b/gcc/rust/resolve/rust-default-resolver.cc
index e2609d13c9a6..d805bc9a511d 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);
   };

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-05-07 16:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-07 16:27 [gcc/devel/rust/master] Visit function return type in default resolver Thomas Schwinge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).