summaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/torture/unused.rs
blob: d95e6b01c008e27ab01402fad51bcf187cb9bda1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// { dg-warning "function is never used: 'bar'" "" { target *-*-* } .+1 }
fn bar() {
    foo();
}

// { dg-warning "function is never used: 'foo'" "" { target *-*-* } .+1 }
fn foo() {
    bar();
}

fn f() {

}

fn main() {
    f();
}