aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/traits9.rs
blob: f4308e8ccc176cc94d79988aa6e72bbe5dddbc47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#[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 .E0277." "" { target *-*-* } .-1 }
}