blob: 3579b5a0842ca9c0739de6bb544c66f236c00495 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
trait Foo {
fn default() -> i32;
}
struct Bar(i32);
fn type_bound_test<T: Foo>() -> i32 {
T::default()
}
fn main() {
let a;
a = type_bound_test::<Bar>();
// { dg-error "bounds not satisfied for Bar" "" { target *-*-* } .-1 }
}
|