From b6ce6882fb601f0b782fa1e8d9e43da8582413ea Mon Sep 17 00:00:00 2001 From: Jakub Dupak Date: Fri, 28 Oct 2022 17:58:39 +0200 Subject: ast: Dump unit struct Signed-off-by: Jakub Dupak --- gcc/rust/ast/rust-ast-dump.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gcc/rust/ast') diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc index 191e328..df42481 100644 --- a/gcc/rust/ast/rust-ast-dump.cc +++ b/gcc/rust/ast/rust-ast-dump.cc @@ -945,7 +945,10 @@ Dump::visit (StructStruct &struct_item) // FIXME: where-clause - visit_items_as_block (struct_item.get_fields (), ","); + if (struct_item.is_unit_struct ()) + stream << ";\n"; + else + visit_items_as_block (struct_item.get_fields (), ","); } void -- cgit v1.1