public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Thomas Schwinge <tschwinge@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc/devel/rust/master] Visit function return type in default resolver
Date: Tue,  7 May 2024 16:27:02 +0000 (GMT)	[thread overview]
Message-ID: <20240507162702.9AB3B386F46B@sourceware.org> (raw)

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);
   };

                 reply	other threads:[~2024-05-07 16:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240507162702.9AB3B386F46B@sourceware.org \
    --to=tschwinge@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).