aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-09-30 16:10:30 -0700
committerGraydon Hoare <[email protected]>2010-09-30 16:10:30 -0700
commit62c224ffe4845ed3a1f651d05ea0be84d5c870ea (patch)
tree4b5fdc0220f369b0cae5784c1d076fe502a78df0 /src/test
parentInitial check-in of 99 Bottles Of Beer (diff)
downloadrust-62c224ffe4845ed3a1f651d05ea0be84d5c870ea.tar.xz
rust-62c224ffe4845ed3a1f651d05ea0be84d5c870ea.zip
Drop slots on block exits even when blocks have no statements. Part way to fixing bind leakage in rustc.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/run-pass/drop-on-empty-block-exit.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/run-pass/drop-on-empty-block-exit.rs b/src/test/run-pass/drop-on-empty-block-exit.rs
new file mode 100644
index 00000000..988f4358
--- /dev/null
+++ b/src/test/run-pass/drop-on-empty-block-exit.rs
@@ -0,0 +1,11 @@
+tag t {
+ foo(@int);
+}
+
+fn main() {
+ auto tt = foo(@10);
+ alt (tt) {
+ case (foo(?z)) {
+ }
+ }
+} \ No newline at end of file