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

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 }
}