aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/traits9.rs
blob: e1aef5397fc9cb02e379cd7ba9ce7a3a2945e4ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
struct Foo(i32);
trait Bar {
    fn baz(&self);
}

fn main() {
    let a;
    a = Foo(123);

    let b: &dyn Bar = &a;
    // { dg-error "bounds not satisfied for Foo .Bar. is not satisfied" "" { target *-*-* } .-1 }
    // { dg-error "expected" "" { target *-*-* } .-2 }
}