summaryrefslogtreecommitdiffstats
path: root/src/test/ui/tail-call-arg-leak.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/tail-call-arg-leak.rs')
-rw-r--r--src/test/ui/tail-call-arg-leak.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/tail-call-arg-leak.rs b/src/test/ui/tail-call-arg-leak.rs
new file mode 100644
index 000000000..a60944b63
--- /dev/null
+++ b/src/test/ui/tail-call-arg-leak.rs
@@ -0,0 +1,9 @@
+// run-pass
+// use of tail calls causes arg slot leaks, issue #160.
+// pretty-expanded FIXME #23616
+
+fn inner(dummy: String, b: bool) { if b { return inner(dummy, false); } }
+
+pub fn main() {
+ inner("hi".to_string(), true);
+}