Skip to content

Commit d5b5aa4

Browse files
committed
Fix ICE regarding tuple struct matches using (..)
Fixes half of #14308.
1 parent ebe1d8e commit d5b5aa4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/librustc/middle/trans/_match.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,9 @@ fn enter_tuple_struct<'a, 'b>(
810810
ast::PatEnum(_, Some(ref elts)) => {
811811
Some(elts.iter().map(|x| (*x)).collect())
812812
}
813+
ast::PatEnum(_, None) => {
814+
Some(Vec::from_elem(n_elts, dummy))
815+
}
813816
_ => {
814817
assert_is_binding_or_wild(bcx, p);
815818
Some(Vec::from_elem(n_elts, dummy))

0 commit comments

Comments
 (0)