public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] ast: Dump parenthesised type
@ 2022-11-18 23:34 Thomas Schwinge
  0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2022-11-18 23:34 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:4c69451b3d46db438a5c2cc436f7b02dbf4bbab2

commit 4c69451b3d46db438a5c2cc436f7b02dbf4bbab2
Author: Jakub Dupak <dev@jakubdupak.com>
Date:   Tue Nov 15 15:52:34 2022 +0100

    ast: Dump parenthesised type
    
    Signed-off-by: Jakub Dupak <dev@jakubdupak.com>

Diff:
---
 gcc/rust/ast/rust-ast-dump.cc | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc
index 0ae57fdb744..8e06bf38a6a 100644
--- a/gcc/rust/ast/rust-ast-dump.cc
+++ b/gcc/rust/ast/rust-ast-dump.cc
@@ -1635,8 +1635,15 @@ Dump::visit (TraitObjectType &type)
 }
 
 void
-Dump::visit (ParenthesisedType &)
-{}
+Dump::visit (ParenthesisedType &type)
+{
+  // Syntax:
+  //    ( Type )
+
+  stream << "(";
+  visit (type.get_type_in_parens ());
+  stream << ")";
+}
 
 void
 Dump::visit (ImplTraitTypeOneBound &type)

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

only message in thread, other threads:[~2022-11-18 23:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-18 23:34 [gcc/devel/rust/master] ast: Dump parenthesised type 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).