aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/issue-2499.rs
blob: 662d58fb5b1282677831866e6db9916bfa91d40e (plain)
1
2
3
4
5
6
7
8
9
10
11
#[lang = "sized"]
pub trait Sized {}

struct Foo;
struct Bar;

impl Foo for Bar {}
// { dg-error "Expected a trait found .Foo. .E0404." "" { target *-*-* } .-1 }

fn baz<T: Foo>(t: T) {}
// { dg-error "Expected a trait found .Foo. .E0404." "" { target *-*-* } .-1 }