Skip to content

Commit

Permalink
Fix ICE regarding tuple struct matches using (..)
Browse files Browse the repository at this point in the history
Fixes half of rust-lang#14308.
  • Loading branch information
lilyball committed May 21, 2014
1 parent ebe1d8e commit d5b5aa4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/librustc/middle/trans/_match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit d5b5aa4

Please sign in to comment.