From 140a2aed7e1cecd162cc975b6d745db38b5d8d31 Mon Sep 17 00:00:00 2001 From: Jakub Dupak Date: Sun, 6 Nov 2022 20:54:40 +0100 Subject: [PATCH] gccrs: ast: Dump array type gcc/rust/ChangeLog: * ast/rust-ast-dump.cc (Dump::visit): Add missing array visitor Signed-off-by: Jakub Dupak --- gcc/rust/ast/rust-ast-dump.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc index b017c6e..9f73d05 100644 --- a/gcc/rust/ast/rust-ast-dump.cc +++ b/gcc/rust/ast/rust-ast-dump.cc @@ -1600,7 +1600,14 @@ Dump::visit (ReferenceType &type) void Dump::visit (ArrayType &type) { + // Syntax: + // [ Type ; Expression ] + + stream << '['; visit (type.get_elem_type ()); + stream << "; "; + visit(type.get_size_expr()); + stream << ']'; } void -- 2.7.4