Commit 3d738e9
committed
Return a fresh, unreachable context after ret, break, and cont
This ensures we don't get compile errors on unreachable code (see
test/run-pass/artificial-block.rs for an example of sane code that
wasn't compiling). In the future, we might want to warn about
non-trivial code appearing in an unreachable context, and/or avoid
generating unreachable code altogether (though I'm sure LLVM will weed
it out as well).1 parent 9432626 commit 3d738e9
2 files changed
+2
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5488 | 5488 | | |
5489 | 5489 | | |
5490 | 5490 | | |
5491 | | - | |
| 5491 | + | |
5492 | 5492 | | |
5493 | 5493 | | |
5494 | 5494 | | |
| |||
5544 | 5544 | | |
5545 | 5545 | | |
5546 | 5546 | | |
5547 | | - | |
| 5547 | + | |
5548 | 5548 | | |
5549 | 5549 | | |
5550 | 5550 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | 2 | | |
7 | 3 | | |
8 | 4 | | |
| |||
0 commit comments