X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=c-bindings-gen%2Fsrc%2Fblocks.rs;fp=c-bindings-gen%2Fsrc%2Fblocks.rs;h=e48a98a5c5a14787f489096eabd8d283267d33ec;hb=18dc4eff64fcad567e67dfe11c501a9b4ec7633e;hp=b214445584b6f6439413f8e5c7e277b5d4af6ad1;hpb=6a5a6d6d70321bb67c79de49a9b8b1469198f440;p=ldk-c-bindings diff --git a/c-bindings-gen/src/blocks.rs b/c-bindings-gen/src/blocks.rs index b214445..e48a98a 100644 --- a/c-bindings-gen/src/blocks.rs +++ b/c-bindings-gen/src/blocks.rs @@ -733,17 +733,9 @@ pub fn maybe_write_generics(w: &mut W, generics: &syn::Generi for (idx, generic) in generics.params.iter().enumerate() { match generic { syn::GenericParam::Type(type_param) => { - let mut printed_param = false; - for bound in type_param.bounds.iter() { - if let syn::TypeParamBound::Trait(trait_bound) = bound { - assert_simple_bound(&trait_bound); - write!(w, "{}crate::{}", if idx != 0 { ", " } else { "" }, gen_types.maybe_resolve_ident(&type_param.ident).unwrap()).unwrap(); - if printed_param { - unimplemented!("Can't print generic params that have multiple non-lifetime bounds"); - } - printed_param = true; - } - } + write!(w, "{}", if idx != 0 { ", " } else { "" }).unwrap(); + let type_ident = &type_param.ident; + types.write_c_type_in_generic_param(w, &syn::parse_quote!(#type_ident), Some(&gen_types), false); }, syn::GenericParam::Lifetime(lt) => { if concrete_lifetimes {