From e311e9b7c591d0e612c1598c202212da201054a3 Mon Sep 17 00:00:00 2001
From: Jakub Dupak <dev@jakubdupak.com>
Date: Tue, 15 Nov 2022 15:52:34 +0100
Subject: [PATCH] gccrs: ast: Dump parenthesised type

gcc/rust/ChangeLog:

	* ast/rust-ast-dump.cc (Dump::visit): Add missing visitor.

Signed-off-by: Jakub Dupak <dev@jakubdupak.com>
---
 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 0ae57fdb7443..8e06bf38a6a2 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)
-- 
GitLab