Fix wiggle tests

This commit is contained in:
Alex Crichton
2021-02-17 13:42:41 -08:00
committed by Andrew Brown
parent df9c725fa0
commit fa98f0bc91
31 changed files with 236 additions and 239 deletions

View File

@@ -9,6 +9,8 @@ use witx::Module;
pub fn passed_by_reference(ty: &witx::Type) -> bool {
match ty {
witx::Type::Pointer(_) | witx::Type::ConstPointer(_) | witx::Type::List(_) => true,
witx::Type::Record(r) => r.bitflags_repr().is_none(),
witx::Type::Variant(v) => !v.is_enum(),
_ => false,
}
}