1 error[E0225]: only auto traits can be used as additional traits in a trait object
2 --> $DIR/issue-22560.rs:9:23
4 LL | type Test = dyn Add + Sub;
5 | --- ^^^ additional non-auto trait
9 = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Add + Sub {}`
10 = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
12 error[E0191]: the value of the associated types `Output` (from trait `Add`), `Output` (from trait `Sub`) must be specified
13 --> $DIR/issue-22560.rs:9:17
16 | ----------- `Output` defined here
19 | ----------- `Output` defined here
21 LL | type Test = dyn Add + Sub;
22 | ^^^ ^^^ associated type `Output` must be specified
24 | associated type `Output` must be specified
26 help: specify the associated types
28 LL | type Test = dyn Add<Output = Type> + Sub<Output = Type>;
29 | ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
31 error[E0393]: the type parameter `Rhs` must be explicitly specified
32 --> $DIR/issue-22560.rs:9:17
34 LL | trait Add<Rhs=Self> {
35 | ------------------- type parameter `Rhs` must be specified for this
37 LL | type Test = dyn Add + Sub;
38 | ^^^ help: set the type parameter to the desired type: `Add<Rhs>`
40 = note: because of the default `Self` reference, type parameters must be specified on object types
42 error[E0393]: the type parameter `Rhs` must be explicitly specified
43 --> $DIR/issue-22560.rs:9:23
45 LL | trait Sub<Rhs=Self> {
46 | ------------------- type parameter `Rhs` must be specified for this
48 LL | type Test = dyn Add + Sub;
49 | ^^^ help: set the type parameter to the desired type: `Sub<Rhs>`
51 = note: because of the default `Self` reference, type parameters must be specified on object types
53 error: aborting due to 4 previous errors
55 Some errors have detailed explanations: E0191, E0225, E0393.
56 For more information about an error, try `rustc --explain E0191`.