aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-pass
diff options
context:
space:
mode:
authorMarijn Haverbeke <[email protected]>2011-05-05 15:30:21 +0200
committerMarijn Haverbeke <[email protected]>2011-05-05 20:19:43 +0200
commit3d738e9e0634a4cd6239d1317bd7dad53be68dc8 (patch)
treeb3757c980217884882ef803e484540e9806b6d83 /src/test/run-pass
parentEradicate fold from capture.rs (diff)
downloadrust-3d738e9e0634a4cd6239d1317bd7dad53be68dc8.tar.xz
rust-3d738e9e0634a4cd6239d1317bd7dad53be68dc8.zip
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).
Diffstat (limited to 'src/test/run-pass')
-rw-r--r--src/test/run-pass/artificial-block.rs4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/test/run-pass/artificial-block.rs b/src/test/run-pass/artificial-block.rs
index 30344c4c..e09dbcc1 100644
--- a/src/test/run-pass/artificial-block.rs
+++ b/src/test/run-pass/artificial-block.rs
@@ -1,8 +1,4 @@
// xfail-stage0
-// xfail-stage1
-// xfail-stage2
-// xfail-stage1
-// xfail-stage2
fn f() -> int {
{ ret 3; }
}