rust/tests/ui/traits/bound/on-structs-and-enums-locals.rs

18 lines
209 B
Rust

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