aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/issue-2043.rs
blob: 92532b75b2a8e6513a566f6fc84b7827ed00399b (plain)
1
2
3
4
5
6
7
8
9
10
11
struct Foo<'a> {
    // { dg-warning "struct is never constructed: .Foo." "" { target *-*-* } .-1 }
    data: &'a [u8],
}

impl<'a> Foo<'a> {
    fn bar(self: &mut Foo<'a>) {}
    // { dg-warning "associated function is never used: .bar." "" { target *-*-* } .-1 }
}

fn main() {}