diff options
Diffstat (limited to 'tests/ui/tail-call-arg-leak.rs')
-rw-r--r-- | tests/ui/tail-call-arg-leak.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/tail-call-arg-leak.rs b/tests/ui/tail-call-arg-leak.rs new file mode 100644 index 000000000..a60944b63 --- /dev/null +++ b/tests/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); +} |