1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
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() { }