1 use std::ops::{Add, Sub, Mul, Div};
2 trait X<Rhs>: Mul<Rhs> + Div<Rhs> {}
3 trait Y<Rhs>: Div<Rhs, Output = Rhs> {
6 trait Z<Rhs>: Div<Rhs> {
10 trait Fine<Rhs>: Div<Rhs, Output = Rhs> {}
12 type Foo<Rhs> = dyn Add<Rhs> + Sub<Rhs> + X<Rhs> + Y<Rhs>;
13 //~^ ERROR only auto traits can be used as additional traits in a trait object
14 //~| ERROR the value of the associated types
15 type Bar<Rhs> = dyn Add<Rhs> + Sub<Rhs> + X<Rhs> + Z<Rhs>;
16 //~^ ERROR only auto traits can be used as additional traits in a trait object
17 //~| ERROR the value of the associated types
18 type Baz<Rhs> = dyn Add<Rhs> + Sub<Rhs> + Y<Rhs>;
19 //~^ ERROR only auto traits can be used as additional traits in a trait object
20 //~| ERROR the value of the associated types
21 type Bat<Rhs> = dyn Add<Rhs> + Sub<Rhs> + Fine<Rhs>;
22 //~^ ERROR only auto traits can be used as additional traits in a trait object
23 //~| ERROR the value of the associated types
24 type Bal<Rhs> = dyn X<Rhs>;
25 //~^ ERROR the value of the associated types