From: Jakub Dupak Date: Sun, 6 Nov 2022 19:54:40 +0000 (+0100) Subject: gccrs: ast: Dump array type X-Git-Tag: basepoints/gcc-14~979 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=140a2aed7e1cecd162cc975b6d745db38b5d8d31;p=thirdparty%2Fgcc.git gccrs: ast: Dump array type gcc/rust/ChangeLog: * ast/rust-ast-dump.cc (Dump::visit): Add missing array visitor Signed-off-by: Jakub Dupak --- diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc index b017c6ea592d..9f73d0565ace 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