gccrs: ast: Dump trait object type one bound
authorJakub Dupak <dev@jakubdupak.com>
Tue, 15 Nov 2022 16:02:00 +0000 (17:02 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 21 Feb 2023 11:36:49 +0000 (12:36 +0100)
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

index 8e06bf3..7d62571 100644 (file)
@@ -1656,8 +1656,15 @@ Dump::visit (ImplTraitTypeOneBound &type)
 }
 
 void
-Dump::visit (TraitObjectTypeOneBound &)
-{}
+Dump::visit (TraitObjectTypeOneBound &type)
+{
+  // Syntax:
+  //    dyn? TraitBound
+
+  if (type.is_dyn ())
+    stream << "dyn ";
+  visit(type.get_trait_bound());
+}
 
 void
 Dump::visit (TupleType &type)