public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] ast: Dump unit struct
@ 2022-11-08 9:29 Thomas Schwinge
0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2022-11-08 9:29 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:b6ce6882fb601f0b782fa1e8d9e43da8582413ea
commit b6ce6882fb601f0b782fa1e8d9e43da8582413ea
Author: Jakub Dupak <dev@jakubdupak.com>
Date: Fri Oct 28 17:58:39 2022 +0200
ast: Dump unit struct
Signed-off-by: Jakub Dupak <dev@jakubdupak.com>
Diff:
---
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-11-08 9:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-08 9:29 [gcc/devel/rust/master] ast: Dump unit struct Thomas Schwinge
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).