We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f1e5fed commit 458aaeaCopy full SHA for 458aaea
capnpc/src/codegen_types.rs
@@ -241,7 +241,17 @@ impl<'a> RustTypeInfo for type_::Reader<'a> {
241
))
242
}
243
type_::AnyPointer(_) => {
244
- Err(Error::failed("List(AnyPointer) is unsupported".to_string()))
+ // This is actually an AnyList, which means we just return an anypointer and
245
+ // let the user cast it appropriately.
246
+ match module {
247
+ Leaf::Reader(lifetime) => {
248
+ Ok(fmt!(ctx, "{capnp}::any_pointer::Reader<{lifetime}>"))
249
+ }
250
+ Leaf::Builder(lifetime) => {
251
+ Ok(fmt!(ctx, "{capnp}::any_pointer::Builder<{lifetime}>"))
252
253
+ _ => Ok(fmt!(ctx, "{capnp}::any_pointer::{module}")),
254
255
256
_ => {
257
let inner = element_type.type_string(ctx, Leaf::Owned)?;
0 commit comments