// Test equality constraints in a where clause where the type being // equated appears in a supertrait. pub trait Vehicle { type Color; fn go(&self) { } } pub trait Box { type Color; // fn mail(&self) { } } pub trait BoxCar : Box + Vehicle { } fn dent(c: C, color: C::Color) { //~^ ERROR ambiguous associated type `Color` in bounds of `C` } fn dent_object(c: dyn BoxCar) { //~^ ERROR ambiguous associated type //~| ERROR the value of the associated types } fn paint(c: C, d: C::Color) { //~^ ERROR ambiguous associated type `Color` in bounds of `C` } fn dent_object_2(c: dyn BoxCar) where ::Color = COLOR { //~^ ERROR the value of the associated types //~| ERROR equality constraints are not yet supported in `where` clauses } fn dent_object_3(c: X) where X: BoxCar, X: Vehicle, X: Box {} // OK! pub fn main() { }