+ _ => {},
+ }
+ }
+
+ write!(w, "<").unwrap();
+ for (idx, generic) in generics.params.iter().enumerate() {
+ match generic {
+ syn::GenericParam::Type(type_param) => {
+ let mut out = Vec::new();
+ let type_ident = &type_param.ident;
+ if types.understood_c_type(&syn::parse_quote!(#type_ident), Some(&gen_types)) {
+ types.write_c_type_in_generic_param(&mut out, &syn::parse_quote!(#type_ident), Some(&gen_types), false);
+ } else {
+ if let Some(syn::PathArguments::AngleBracketed(args)) = generics_impld {
+ if let syn::GenericArgument::Type(ty) = &args.args[idx] {
+ types.write_c_type_in_generic_param(&mut out, &ty, Some(&gen_types), false);
+ }
+ }
+ }
+ if !out.is_empty() {
+ write!(w, "{}, ", String::from_utf8(out).unwrap()).unwrap();
+ }
+ },
+ syn::GenericParam::Lifetime(lt) => {
+ if dummy_lifetimes {
+ write!(w, "'_, ").unwrap();
+ } else if concrete_lifetimes {
+ write!(w, "'static, ").unwrap();
+ } else {
+ write!(w, "'{}, ", lt.lifetime.ident).unwrap();
+ }
+ },
+ _ => unimplemented!(),