X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-c-bindings;a=blobdiff_plain;f=c-bindings-gen%2Fsrc%2Fmain.rs;h=b88f37ffe9e306cc0ac83b5abfaa16d7118e0af1;hp=ea624e5fd10b6007379dffb3f9fd0c933f8c82d3;hb=3a9500828833fa20d8d8c44eea4ed05342187fa9;hpb=14e40078699863ba8e15dbcfd2cd163ae67e5e5f diff --git a/c-bindings-gen/src/main.rs b/c-bindings-gen/src/main.rs index ea624e5..b88f37f 100644 --- a/c-bindings-gen/src/main.rs +++ b/c-bindings-gen/src/main.rs @@ -771,6 +771,11 @@ fn writeln_impl(w: &mut W, i: &syn::ItemImpl, types: &mut Typ if p.qself.is_some() { unimplemented!(); } if let Some(ident) = single_ident_generic_path_to_ident(&p.path) { if let Some(resolved_path) = types.maybe_resolve_non_ignored_ident(&ident) { + if !types.understood_c_path(&p.path) { + eprintln!("Not implementing anything for impl {} as the type is not understood (probably C-not exported)", ident); + return; + } + let mut gen_types = GenericTypes::new(Some(resolved_path.clone())); if !gen_types.learn_generics(&i.generics, types) { eprintln!("Not implementing anything for impl {} due to not understood generics", ident);