projects
/
platform
/
upstream
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a56faba
)
gccrs: ast: Dump unit struct
author
Jakub Dupak
<dev@jakubdupak.com>
Fri, 28 Oct 2022 15:58:39 +0000
(17:58 +0200)
committer
Arthur Cohen
<arthur.cohen@embecosm.com>
Tue, 21 Feb 2023 11:36:44 +0000
(12:36 +0100)
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Add handling for unit structures.
Signed-off-by: Jakub Dupak <dev@jakubdupak.com>
gcc/rust/ast/rust-ast-dump.cc
patch
|
blob
|
history
diff --git
a/gcc/rust/ast/rust-ast-dump.cc
b/gcc/rust/ast/rust-ast-dump.cc
index
191e328
..
df42481
100644
(file)
--- 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