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

21 lines
224 B
Rust

trait Trait {}
struct Foo<T:Trait> {
x: T,
}
enum Bar<T:Trait> {
ABar(isize),
BBar(T),
CBar(usize),
}
fn explode(x: Foo<u32>) {}
//~^ ERROR E0277
fn kaboom(y: Bar<f32>) {}
//~^ ERROR E0277
fn main() {
}