aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/issue-2043.rs
blob: efa1ded75305d9c29c37e428e11abf7bf53656ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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 }
    // { dg-warning "unused name .self." "" { target *-*-* } .-2 }
}

fn main() {}