aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-pass
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-09-13 13:37:24 -0700
committerGraydon Hoare <[email protected]>2010-09-13 13:37:24 -0700
commitbc646d01c501f2566fd78057e23c283cfedc0eb0 (patch)
tree9bfe2f19a42e79b1ded82be5428f0bb33ec3f61f /src/test/run-pass
parentFix a leak when box types are used via type descriptors. (diff)
downloadrust-bc646d01c501f2566fd78057e23c283cfedc0eb0.tar.xz
rust-bc646d01c501f2566fd78057e23c283cfedc0eb0.zip
Fix leaking arg slots on tail calls. Closes #160.
Diffstat (limited to 'src/test/run-pass')
-rw-r--r--src/test/run-pass/tail-call-arg-leak.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/run-pass/tail-call-arg-leak.rs b/src/test/run-pass/tail-call-arg-leak.rs
new file mode 100644
index 00000000..d99ceaec
--- /dev/null
+++ b/src/test/run-pass/tail-call-arg-leak.rs
@@ -0,0 +1,11 @@
+// use of tail calls causes arg slot leaks, issue #160.
+
+fn inner(str dummy, bool b) {
+ if (b) {
+ be inner(dummy, false);
+ }
+}
+
+fn main() {
+ inner("hi", true);
+}