From: Matt Corallo Date: Tue, 25 Apr 2023 17:14:37 +0000 (+0000) Subject: Replace type resolution assertions with failures X-Git-Tag: v0.0.115.0^2~6 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=cd178385527ffe4e15b935005df984fc042be30f;p=ldk-c-bindings Replace type resolution assertions with failures Type resolution now supports failing, but some assertions are still left over from when it didn't. Replace some of those which now fail on LDK 0.0.115. --- diff --git a/c-bindings-gen/src/types.rs b/c-bindings-gen/src/types.rs index c02b1dd..b92ca77 100644 --- a/c-bindings-gen/src/types.rs +++ b/c-bindings-gen/src/types.rs @@ -2685,10 +2685,16 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> { } else if let syn::Type::Path(p_arg) = t { if let Some(resolved) = self.maybe_resolve_path(&p_arg.path, generics) { if !self.is_primitive(&resolved) { - assert!(!is_ref); // We don't currently support outer reference types for non-primitive inners + if is_ref { + // We don't currently support outer reference types for non-primitive inners + return false; + } } } else { - assert!(!is_ref); // We don't currently support outer reference types for non-primitive inners + if is_ref { + // We don't currently support outer reference types for non-primitive inners + return false; + } } if !self.write_c_type_intern(w, t, generics, false, false, false, true, true) { return false; } } else {