1 // Test equality constraints in a where clause where the type being
2 // equated appears in a supertrait.
16 pub trait BoxCar : Box + Vehicle {
19 fn dent<C:BoxCar>(c: C, color: C::Color) {
20 //~^ ERROR ambiguous associated type `Color` in bounds of `C`
23 fn dent_object<COLOR>(c: dyn BoxCar<Color=COLOR>) {
24 //~^ ERROR ambiguous associated type
25 //~| ERROR the value of the associated types
28 fn paint<C:BoxCar>(c: C, d: C::Color) {
29 //~^ ERROR ambiguous associated type `Color` in bounds of `C`
32 fn dent_object_2<COLOR>(c: dyn BoxCar) where <dyn BoxCar as Vehicle>::Color = COLOR {
33 //~^ ERROR the value of the associated types
34 //~| ERROR equality constraints are not yet supported in `where` clauses
37 fn dent_object_3<X, COLOR>(c: X)
39 X: Vehicle<Color = COLOR>,