Skip to content

Commit fabca77

Browse files
committed
Move type alias trivial asserts to section
1 parent 4cefa72 commit fabca77

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

gen/src/write.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,19 @@ pub(super) fn gen(
8080
write_struct_with_methods(out, ety, methods);
8181
}
8282
}
83-
Api::TypeAlias(ety) => {
84-
if types.required_trivial.contains_key(&ety.ident) {
85-
check_trivial_extern_type(out, &ety.ident)
86-
}
87-
}
8883
_ => {}
8984
}
9085
}
9186

87+
out.next_section();
88+
for api in apis {
89+
if let Api::TypeAlias(ety) = api {
90+
if types.required_trivial.contains_key(&ety.ident) {
91+
check_trivial_extern_type(out, &ety.ident)
92+
}
93+
}
94+
}
95+
9296
if !header {
9397
out.begin_block("extern \"C\"");
9498
write_exception_glue(out, apis);

0 commit comments

Comments
 (0)