From: Jakub Dupak <[email protected]>
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Add handling for unit structures.
Signed-off-by: Jakub Dupak <[email protected]>
---
gcc/rust/ast/rust-ast-dump.cc | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc
index 191e328b134..df42481c248 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
--
2.39.1
--
Gcc-rust mailing list
[email protected]
https://gcc.gnu.org/mailman/listinfo/gcc-rust