1 error[E0393]: the type parameter `Rhs` must be explicitly specified
2 --> $DIR/issue-22560.rs:9:23
4 LL | / trait Sub<Rhs=Self> {
7 | |_- type parameter `Rhs` must be specified for this
9 LL | type Test = dyn Add + Sub;
10 | ^^^ help: set the type parameter to the desired type: `Sub<Rhs>`
12 = note: because of the default `Self` reference, type parameters must be specified on object types
14 error[E0393]: the type parameter `Rhs` must be explicitly specified
15 --> $DIR/issue-22560.rs:9:17
17 LL | / trait Add<Rhs=Self> {
20 | |_- type parameter `Rhs` must be specified for this
22 LL | type Test = dyn Add + Sub;
23 | ^^^ help: set the type parameter to the desired type: `Add<Rhs>`
25 = note: because of the default `Self` reference, type parameters must be specified on object types
27 error[E0225]: only auto traits can be used as additional traits in a trait object
28 --> $DIR/issue-22560.rs:9:23
30 LL | type Test = dyn Add + Sub;
31 | --- ^^^ additional non-auto trait
33 | first non-auto trait
35 = help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Add<[type error]> + Sub<[type error]> {}`
36 = 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>
38 error[E0191]: the value of the associated types `Output` (from trait `Add`), `Output` (from trait `Sub`) must be specified
39 --> $DIR/issue-22560.rs:9:17
42 | ------------ `Output` defined here
45 | ------------ `Output` defined here
47 LL | type Test = dyn Add + Sub;
48 | ^^^ ^^^ associated type `Output` must be specified
50 | associated type `Output` must be specified
52 help: specify the associated types
54 LL | type Test = dyn Add<Output = Type> + Sub<Output = Type>;
55 | ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
57 error: aborting due to 4 previous errors
59 Some errors have detailed explanations: E0191, E0225, E0393.
60 For more information about an error, try `rustc --explain E0191`.