wiggle-generate: teach about anonymous array types

This commit is contained in:
Pat Hickey
2020-03-16 17:28:39 -07:00
parent 32595faba5
commit fc4f96a73f

View File

@@ -66,7 +66,11 @@ impl Names {
let pointee_type = self.type_ref(&pointee, lifetime.clone());
quote!(wiggle_runtime::GuestPtr<#lifetime, #pointee_type>)
}
_ => unimplemented!("anonymous type ref"),
witx::Type::Array(pointee) => {
let pointee_type = self.type_ref(&pointee, lifetime.clone());
quote!(wiggle_runtime::GuestPtr<#lifetime, [#pointee_type]>)
}
_ => unimplemented!("anonymous type ref {:?}", tref),
},
}
}