Move type alias trivial asserts to section
diff --git a/gen/src/write.rs b/gen/src/write.rs
index 3c81dc8..4276e9b 100644
--- a/gen/src/write.rs
+++ b/gen/src/write.rs
@@ -80,15 +80,19 @@
write_struct_with_methods(out, ety, methods);
}
}
- Api::TypeAlias(ety) => {
- if types.required_trivial.contains_key(&ety.ident) {
- check_trivial_extern_type(out, &ety.ident)
- }
- }
_ => {}
}
}
+ out.next_section();
+ for api in apis {
+ if let Api::TypeAlias(ety) = api {
+ if types.required_trivial.contains_key(&ety.ident) {
+ check_trivial_extern_type(out, &ety.ident)
+ }
+ }
+ }
+
if !header {
out.begin_block("extern \"C\"");
write_exception_glue(out, apis);