aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/issue-3553.rs
blob: 546f3c17beddfe52a4a7e949ef55fca07b994e35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
trait Foo {
    fn f(&self) -> isize;
}

trait Bar: Foo {
    fn g(&self) -> isize;
}

struct A {
    x: isize,
}

impl Bar for A {
    // { dg-error "the trait bound .A: Foo. is not satisfied .E0277." "" { target *-*-* } .-1 }
    fn g(&self) -> isize {
        self.f()
    }
}