Debian Codegraph @

gcc/testsuite/rust/compile/issue-2043.rs

raw
1 struct Foo<'a> {
2 // { dg-warning "struct is never constructed: .Foo." "" { target *-*-* } .-1 }
3 data: &'a [u8],
4 }
5
6 impl<'a> Foo<'a> {
7 fn bar(self: &mut Foo<'a>) {}
8 // { dg-warning "associated function is never used: .bar." "" { target *-*-* } .-1 }
9 // { dg-warning "unused name .self." "" { target *-*-* } .-2 }
10 }
11
12 fn main() {}