Fix ICE regarding tuple struct matches using (..)

Fixes half of #14308.
This commit is contained in:
Kevin Ballard 2014-05-20 16:57:44 -07:00
parent ebe1d8ec2a
commit d5b5aa4d4a
1 changed files with 3 additions and 0 deletions

View File

@ -810,6 +810,9 @@ fn enter_tuple_struct<'a, 'b>(
ast::PatEnum(_, Some(ref elts)) => {
Some(elts.iter().map(|x| (*x)).collect())
}
ast::PatEnum(_, None) => {
Some(Vec::from_elem(n_elts, dummy))
}
_ => {
assert_is_binding_or_wild(bcx, p);
Some(Vec::from_elem(n_elts, dummy))