Skip to content

Commit bf2c85d

Browse files
committed
fmt
1 parent 442fe55 commit bf2c85d

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

tests/codegen/tail-call-musttail.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,7 @@
1212
pub fn simple_tail_call(n: i32) -> i32 {
1313
// CHECK: musttail call {{.*}}@simple_tail_call(
1414
// CHECK-NEXT: ret i32
15-
if n <= 0 {
16-
0
17-
} else {
18-
become simple_tail_call(n - 1)
19-
}
15+
if n <= 0 { 0 } else { become simple_tail_call(n - 1) }
2016
}
2117

2218
// CHECK-LABEL: define {{.*}}@tail_call_with_args(
@@ -25,9 +21,5 @@ pub fn simple_tail_call(n: i32) -> i32 {
2521
pub fn tail_call_with_args(a: i32, b: i32, c: i32) -> i32 {
2622
// CHECK: musttail call {{.*}}@tail_call_with_args(
2723
// CHECK-NEXT: ret i32
28-
if a == 0 {
29-
b + c
30-
} else {
31-
become tail_call_with_args(a - 1, b + 1, c)
32-
}
24+
if a == 0 { b + c } else { become tail_call_with_args(a - 1, b + 1, c) }
3325
}

0 commit comments

Comments
 (0)