use std::ops::{Add, Sub, Mul, Div}; trait X: Mul + Div {} trait Y: Div { type A; } trait Z: Div { type A; type B; } trait Fine: Div {} type Foo = dyn Add + Sub + X + Y; //~^ ERROR only auto traits can be used as additional traits in a trait object //~| ERROR the value of the associated types type Bar = dyn Add + Sub + X + Z; //~^ ERROR only auto traits can be used as additional traits in a trait object //~| ERROR the value of the associated types type Baz = dyn Add + Sub + Y; //~^ ERROR only auto traits can be used as additional traits in a trait object //~| ERROR the value of the associated types type Bat = dyn Add + Sub + Fine; //~^ ERROR only auto traits can be used as additional traits in a trait object //~| ERROR the value of the associated types type Bal = dyn X; //~^ ERROR the value of the associated types fn main() {}