diff options
| author | Kivooeo <Kivooeo123@gmail.com> | 2025-07-01 20:20:14 +0500 |
|---|---|---|
| committer | Kivooeo <Kivooeo123@gmail.com> | 2025-07-13 00:03:31 +0500 |
| commit | 47b8a32ca311e2c441f4e7d747bfd75f0045baa1 (patch) | |
| tree | 081904d1f6314f1ba20a7aabfe52a2a02dc95a16 /tests/ui/recursion/recursion-tail-call-no-arg-leak.rs | |
| parent | bfc046a4b8d6b57db02540182466e989a9b0fb40 (diff) | |
| download | rust-47b8a32ca311e2c441f4e7d747bfd75f0045baa1.tar.gz rust-47b8a32ca311e2c441f4e7d747bfd75f0045baa1.zip | |
moved tests
Diffstat (limited to 'tests/ui/recursion/recursion-tail-call-no-arg-leak.rs')
| -rw-r--r-- | tests/ui/recursion/recursion-tail-call-no-arg-leak.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ui/recursion/recursion-tail-call-no-arg-leak.rs b/tests/ui/recursion/recursion-tail-call-no-arg-leak.rs new file mode 100644 index 00000000000..234924307c3 --- /dev/null +++ b/tests/ui/recursion/recursion-tail-call-no-arg-leak.rs @@ -0,0 +1,8 @@ +//@ run-pass +// use of tail calls causes arg slot leaks, issue #160. + +fn inner(dummy: String, b: bool) { if b { return inner(dummy, false); } } + +pub fn main() { + inner("hi".to_string(), true); +} |
