aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/issue-925.rs
blob: 507fe9444e5fafd198901ae1132a9384057f4d89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#[lang = "sized"]
pub trait Sized {}

struct S;
trait A {
    fn foo(&self);
}

trait B: A {
    fn foo(&self);
}

impl A for S {
    fn foo(&self) {}
}

impl B for S {
    fn foo(&self) {}
}
// E0592
fn test() {
    let a = S;
    a.foo();
    // { dg-error "duplicate definitions with name .foo." "" { target *-*-* } .-1 }
}