- write!(w, "{}::{}(", types.module_path, f.sig.ident).unwrap();
+ write!(w, "{}::{}", types.module_path, f.sig.ident).unwrap();
+
+ let mut function_generic_args = Vec::new();
+ maybe_write_generics(&mut function_generic_args, &f.sig.generics, types, true);
+ if !function_generic_args.is_empty() {
+ write!(w, "::{}", String::from_utf8(function_generic_args).unwrap()).unwrap();
+ }
+ write!(w, "(").unwrap();
+