From fc4f96a73f0c0a1c4de34038de58688522403472 Mon Sep 17 00:00:00 2001 From: Pat Hickey Date: Mon, 16 Mar 2020 17:28:39 -0700 Subject: [PATCH] wiggle-generate: teach about anonymous array types --- crates/wiggle/crates/generate/src/names.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/wiggle/crates/generate/src/names.rs b/crates/wiggle/crates/generate/src/names.rs index d545b37845..75dd9b986f 100644 --- a/crates/wiggle/crates/generate/src/names.rs +++ b/crates/wiggle/crates/generate/src/names.rs @@ -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), }, } }