aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/torture/traits3.rs
blob: d805da5d2d4d390873ce6dcbb43175c16681f6cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#[lang = "sized"]
pub trait Sized {}

pub trait Foo {
    fn Bar(self) -> i32;
}

struct Baz;
// { dg-warning "struct is never constructed: .Baz." "" { target *-*-* } .-1 }

impl Foo for Baz {
    fn Bar(self) -> i32 {
        // { dg-warning "unused name .self." "" { target *-*-* } .-1 }
        123
    }
}

fn main() {}