Skip to content

Commit e75e87d

Browse files
committed
Add dummy ByteRepr for opaque structs
1 parent 609ae54 commit e75e87d

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

cpp2rust/converter/converter.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,8 @@ use std::rc::Rc;
5858
std::string Converter::EmitOpaqueRecords() {
5959
std::string out;
6060
record_decls_.ForEachUndefined([&](const std::string &name) {
61-
out += "pub struct ";
62-
out += name;
63-
out += ";\n";
61+
out += std::format("pub struct {};\n", name);
62+
out += std::format("impl ByteRepr for {} {{}}\n", name);
6463
});
6564
return out;
6665
}

0 commit comments

Comments
 (0)