rust/src/test/ui/traits/trait-bounds-on-structs-and-enums-locals.rs
2018-12-25 21:08:33 -07:00

18 lines
209 B
Rust

trait Trait {
fn dummy(&self) { }
}
struct Foo<T:Trait> {
x: T,
}
fn main() {
let foo = Foo {
//~^ ERROR E0277
x: 3
};
let baz: Foo<usize> = loop { };
//~^ ERROR E0277
}