Skip to content

Commit a097b4c

Browse files
committed
---
yaml --- r: 1983 b: refs/heads/master c: 6e6acaa h: refs/heads/master i: 1981: 4f1a038 1979: f1dfddd 1975: 2aeeb93 1967: 0a27f31 1951: 4c138ff 1919: 9086a67 v: v3
1 parent f9c4f9f commit a097b4c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

[refs]

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 9d0a505d61e77d6186631552065438aa04944b12
2+
refs/heads/master: 6e6acaa39a2d6e7491ef282e6ca0f6b4db808321

trunk/src/comp/middle/trans.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -3581,9 +3581,9 @@ fn trans_alt(@block_ctxt cx, @ast.expr expr, vec[ast.arm] arms)
35813581
this_cx = next_cx;
35823582
}
35833583

3584-
// FIXME: This is executed when none of the patterns match; it should fail
3585-
// instead!
3586-
this_cx.build.Br(last_cx.llbb);
3584+
auto default_cx = this_cx;
3585+
auto default_res = trans_fail(default_cx, expr.span,
3586+
"non-exhaustive match failure");
35873587

35883588
// FIXME: This is very wrong; we should phi together all the arm blocks,
35893589
// since this is an expression.

0 commit comments

Comments
 (0)