Skip to content

Commit 67a6163

Browse files
committed
rustc: Fix segfault due to nonexhaustive match when using tags
1 parent 42282a2 commit 67a6163

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/comp/middle/typeck.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,9 @@ fn collect_item_types(@ast.crate crate) -> tup(@ast.crate, @ty_table) {
434434
case (ast.item_mod(_, _, _)) {
435435
result = it.node;
436436
}
437+
case (ast.item_tag(_, _, _, _)) {
438+
result = it.node;
439+
}
437440
}
438441
items_t += vec(@fold.respan[ast.item_](it.span, result));
439442
}

0 commit comments

Comments
 (0)