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 | 98934707eb7824cd48ee3889d4570c1406c39ba4 (patch) | |
| tree | ea1189bcf19374f2c0c23a546c3133f2999117a9 /tests/ui/recursion/recursion-tail-call-no-arg-leak.rs | |
| parent | 47b8a32ca311e2c441f4e7d747bfd75f0045baa1 (diff) | |
| download | rust-98934707eb7824cd48ee3889d4570c1406c39ba4.tar.gz rust-98934707eb7824cd48ee3889d4570c1406c39ba4.zip | |
cleaned up some tests
Additionally, remove unused `tests/ui/auxiliary/svh-*` crates that are duplicates of `tests/ui/svh/auxiliary/svh-*`.
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 | 11 |
1 files changed, 9 insertions, 2 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 index 234924307c3..fe10b890700 100644 --- a/tests/ui/recursion/recursion-tail-call-no-arg-leak.rs +++ b/tests/ui/recursion/recursion-tail-call-no-arg-leak.rs @@ -1,7 +1,14 @@ +//! This test verifies that tail call optimization does not lead to argument slot leaks. +//! +//! Regression test for: <https://github.com/rust-lang/rust/issues/160> + //@ run-pass -// use of tail calls causes arg slot leaks, issue #160. -fn inner(dummy: String, b: bool) { if b { return inner(dummy, false); } } +fn inner(dummy: String, b: bool) { + if b { + return inner(dummy, false); + } +} pub fn main() { inner("hi".to_string(), true); |
