summary refs log tree commit diff
path: root/src/test/run-pass/unreachable-code.rs
AgeCommit message (Collapse)AuthorLines
2012-03-26Disallow ret inside of block functionsMarijn Haverbeke-1/+1
Also adds proper checking for cont/break being inside a loop. Closes #1854 Issue #1619
2012-03-24Avoid unifying vars when possible; handle bot (more) correctlyNiko Matsakis-2/+2
2012-03-22make --enforce-mut-vars always on, add mut annotations to remaining filesNiko Matsakis-1/+1
2012-03-09Add an infinite loop constructTim Chevalier-1/+1
Add a loop {} construct for infinite loops, and use it in test cases. See #1906 for details.
2012-02-15Rewrite exhaustiveness checkerMarijn Haverbeke-1/+1
Issue #352 Closes #1720 The old checker would happily accept things like 'alt x { @some(a) { a } }'. It now properly descends into patterns, checks exhaustiveness of booleans, and complains when number/string patterns aren't exhaustive.
2012-01-09Change all uses of 'when' in alt-patterns to 'if'Austin Seipp-1/+1
Issue #1396
2011-12-22Register new snapshots, purge log_err and log_full in favour of log(...).Graydon Hoare-4/+4
2011-12-22Register snapshots and switch logging over to use of log_full or #error / ↵Graydon Hoare-4/+4
#debug.
2011-10-21Remove remaining uses of iter and for-eachMarijn Haverbeke-4/+0
Issue #1056
2011-09-27Test for #924Jesse Ruderman-1/+16
2011-09-25Test for #973Jesse Ruderman-0/+4
2011-09-25Test for #942Jesse Ruderman-0/+2
2011-09-23Add more unreachable-code tests. Closes #935Jesse Ruderman-0/+6
2011-09-23xfail-pretty unreachable-code.rsMarijn Haverbeke-0/+2
2011-09-23Better handling of unreachable code in transMarijn Haverbeke-0/+35
The builder functions in trans_build now look at an 'unreachable' flag in the block context and don't generate code (returning undefined placeholder values) when this flag is set. Threading the unreachable flag through context still requires some care, but this seems a more sane approach than re-checking for terminated blocks throughout the compiler. When creating a block, if you use its closest dominator as parent, the flag will be automatically passed through. If you can't do that, because the dominator is a scope block that you're trying to get out of, you'll have to do something like this to explicitly pass on the flag: if bcx.unreachable { Unreachable(next_cx); } Closes #949. Closes #946. Closes #942. Closes #895. Closes #894. Closes #892. Closes #957. Closes #958.