public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] ast: Fix tokenstream function body
@ 2023-04-18 16:46 Thomas Schwinge
  0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2023-04-18 16:46 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:2d478a4c3e116602bd124fd994d5ad043252bac3

commit 2d478a4c3e116602bd124fd994d5ad043252bac3
Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Date:   Mon Apr 17 18:04:41 2023 +0200

    ast: Fix tokenstream function body
    
    Function body were skipped in tokenstream when no return type was
    provided.
    
    gcc/rust/ChangeLog:
    
            * ast/rust-ast-tokenstream.cc (TokenStream::visit_function_common):
            Fix function body output.
    
    Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>

Diff:
---
 gcc/rust/ast/rust-ast-tokenstream.cc | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/gcc/rust/ast/rust-ast-tokenstream.cc b/gcc/rust/ast/rust-ast-tokenstream.cc
index 78b53852658..67b122a9089 100644
--- a/gcc/rust/ast/rust-ast-tokenstream.cc
+++ b/gcc/rust/ast/rust-ast-tokenstream.cc
@@ -1978,10 +1978,7 @@ TokenStream::visit_function_common (std::unique_ptr<Type> &return_type,
 
   if (block)
     {
-      if (return_type)
-	{
-	  visit (block);
-	}
+      visit (block);
     }
   else
     {

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

only message in thread, other threads:[~2023-04-18 16:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-18 16:46 [gcc/devel/rust/master] ast: Fix tokenstream function body 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).