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

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() {
}