Allow lifetimes with empty list of bounds
diff --git a/src/generics.rs b/src/generics.rs
index 47ff003..6f89adb 100644
--- a/src/generics.rs
+++ b/src/generics.rs
@@ -196,7 +196,7 @@
life: lifetime >>
bounds: opt_vec!(preceded!(
punct!(":"),
- separated_nonempty_list!(punct!("+"), lifetime)
+ separated_list!(punct!("+"), lifetime)
)) >>
(LifetimeDef {
attrs: attrs,
@@ -258,8 +258,10 @@
named!(where_predicate -> WherePredicate, alt!(
do_parse!(
ident: lifetime >>
- punct!(":") >>
- bounds: separated_nonempty_list!(punct!("+"), lifetime) >>
+ bounds: opt_vec!(preceded!(
+ punct!(":"),
+ separated_list!(punct!("+"), lifetime)
+ )) >>
(WherePredicate::RegionPredicate(WhereRegionPredicate {
lifetime: ident,
bounds: bounds,