commit | 617352731b1047c9ab6d954a09967bf794ddeafb | [log] [tgz] |
---|---|---|
author | David Tolnay <dtolnay@gmail.com> | Sun Oct 30 17:34:23 2016 -0700 |
committer | David Tolnay <dtolnay@gmail.com> | Sun Oct 30 17:34:23 2016 -0700 |
tree | 410d18d737a5f0524d4e618fa2151915d94d2a34 | |
parent | 385a0f74b33c269b1fcbc3f40c25d42f9ee63660 [diff] |
Allow trailing comma in vec pat
diff --git a/src/expr.rs b/src/expr.rs index ecdf708..94ac7dc 100644 --- a/src/expr.rs +++ b/src/expr.rs
@@ -1130,6 +1130,7 @@ cond!(!after.is_empty(), option!(punct!(","))) >> (comma_before_dots.is_some(), after) )) >> + cond!(after.is_none(), option!(punct!(","))) >> punct!("]") >> (match after { None => Pat::Slice(before, None, Vec::new()),