Allow trailing commas inside generics
diff --git a/src/generics.rs b/src/generics.rs
index 6f89adb..99165c4 100644
--- a/src/generics.rs
+++ b/src/generics.rs
@@ -165,6 +165,7 @@
                     cond!(!lifetimes.is_empty(), punct!(",")),
                     separated_nonempty_list!(punct!(","), ty_param)
                 )) >>
+                cond!(!lifetimes.is_empty() || !ty_params.is_empty(), option!(punct!(","))) >>
                 punct!(">") >>
                 (lifetimes, ty_params)
             )