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

trait Foo {
    const A: i32;

    fn test(self);
}

struct Bar;
impl Foo for Bar {
    // { dg-error "missing A in implementation of trait .Foo." "" { target *-*-* } .-1 }
    fn test(self) {}
}

fn main() {
    let a = Bar;
    a.test();
}