2015-02-12 09:29:52 -06:00
|
|
|
trait Trait {
|
|
|
|
fn dummy(&self) { }
|
|
|
|
}
|
2014-08-11 19:12:01 -05:00
|
|
|
|
|
|
|
struct Foo<T:Trait> {
|
|
|
|
x: T,
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let foo = Foo {
|
2015-01-31 10:23:42 -06:00
|
|
|
x: 3
|
2022-08-16 23:57:17 -05:00
|
|
|
//~^ ERROR E0277
|
2014-08-11 19:12:01 -05:00
|
|
|
};
|
2014-09-12 09:45:39 -05:00
|
|
|
|
2016-01-08 20:41:37 -06:00
|
|
|
let baz: Foo<usize> = loop { };
|
2016-03-29 12:12:31 -05:00
|
|
|
//~^ ERROR E0277
|
2014-08-11 19:12:01 -05:00
|
|
|
}
|