rust/tests/ui/traits/bound/on-structs-and-enums-locals.rs
2023-01-11 09:32:08 +00:00

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
}