Skip to content

Commit 89e386d

Browse files
committed
Atom cannot be in required_trivial_aliases
1 parent 445dcc6 commit 89e386d

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

gen/src/write.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -129,18 +129,18 @@ pub(super) fn gen(
129129
fn write_includes(out: &mut OutFile, types: &Types) {
130130
for ty in types {
131131
match ty {
132-
Type::Ident(ident) => {
133-
match Atom::from(ident) {
134-
Some(U8) | Some(U16) | Some(U32) | Some(U64) | Some(I8) | Some(I16)
135-
| Some(I32) | Some(I64) => out.include.cstdint = true,
136-
Some(Usize) => out.include.cstddef = true,
137-
Some(CxxString) => out.include.string = true,
138-
Some(Bool) | Some(Isize) | Some(F32) | Some(F64) | Some(RustString) | None => {}
139-
};
140-
if types.required_trivial_aliases.contains(&ident) {
141-
out.include.type_traits = true;
142-
};
143-
}
132+
Type::Ident(ident) => match Atom::from(ident) {
133+
Some(U8) | Some(U16) | Some(U32) | Some(U64) | Some(I8) | Some(I16) | Some(I32)
134+
| Some(I64) => out.include.cstdint = true,
135+
Some(Usize) => out.include.cstddef = true,
136+
Some(CxxString) => out.include.string = true,
137+
Some(Bool) | Some(Isize) | Some(F32) | Some(F64) | Some(RustString) => {}
138+
None => {
139+
if types.required_trivial_aliases.contains(&ident) {
140+
out.include.type_traits = true;
141+
}
142+
}
143+
},
144144
Type::RustBox(_) => out.include.type_traits = true,
145145
Type::UniquePtr(_) => out.include.memory = true,
146146
Type::CxxVector(_) => out.include.vector = true,

0 commit comments

Comments
 (0)