Debian Codegraph @

gcc/testsuite/rust/compile/torture/block_expr1.rs

raw
1 fn test3(x: i32) -> i32 {
2 if x > 1 {
3 5
4 } else {
5 0
6 }
7 }
8
9 fn test5(x: i32) -> i32 {
10 if x > 1 {
11 if x == 5 {
12 7
13 } else {
14 9
15 }
16 } else {
17 0
18 }
19 }
20
21 fn main() {
22 let call3: i32 = { test3(3) + 2 };
23 // { dg-warning "unused name" "" { target *-*-* } .-1 }
24 let call5 = {
25 // { dg-warning "unused name" "" { target *-*-* } .-1 }
26 let a = test5(5);
27 a + 1
28 };
29 }