summaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/torture/impl_block_unused.rs
blob: fea863192437ab4c27c49d03b09716ba93f2b3d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
struct Foo(i32, bool);

impl Foo {
    fn new(a: i32, b: bool) -> Foo {
        // { dg-warning "associated function is never used" "" { target *-*-* } .-1 }
        Foo(a, b)
    }

    fn test2() -> i32 {
        // { dg-warning "associated function is never used" "" { target *-*-* } .-1 }
        1
    }
}

fn main() {
    let _a = Foo(1, true);
}