gccrs: ast: Dump slice type
authorJakub Dupak <dev@jakubdupak.com>
Sun, 6 Nov 2022 19:49:17 +0000 (20:49 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 21 Feb 2023 11:36:46 +0000 (12:36 +0100)
gcc/rust/ChangeLog:

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

Signed-off-by: Jakub Dupak <dev@jakubdupak.com>
gcc/rust/ast/rust-ast-dump.cc

index e5e051a..b017c6e 100644 (file)
@@ -1606,7 +1606,12 @@ Dump::visit (ArrayType &type)
 void
 Dump::visit (SliceType &type)
 {
+  // Syntax:
+  //    [ Type ]
+
+  stream << '[';
   visit (type.get_elem_type ());
+  stream << ']';
 }
 
 void