]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/issue-22560.stderr
Apply c_enum_min_bits = 8 to (arm|thumb)-none- platforms
[rust.git] / src / test / ui / associated-types / issue-22560.stderr
1 error[E0393]: the type parameter `Rhs` must be explicitly specified
2   --> $DIR/issue-22560.rs:9:23
3    |
4 LL | / trait Sub<Rhs=Self> {
5 LL | |     type Output;
6 LL | | }
7    | |_- type parameter `Rhs` must be specified for this
8 LL | 
9 LL |   type Test = dyn Add + Sub;
10    |                         ^^^ help: set the type parameter to the desired type: `Sub<Rhs>`
11    |
12    = note: because of the default `Self` reference, type parameters must be specified on object types
13
14 error[E0393]: the type parameter `Rhs` must be explicitly specified
15   --> $DIR/issue-22560.rs:9:17
16    |
17 LL | / trait Add<Rhs=Self> {
18 LL | |     type Output;
19 LL | | }
20    | |_- type parameter `Rhs` must be specified for this
21 ...
22 LL |   type Test = dyn Add + Sub;
23    |                   ^^^ help: set the type parameter to the desired type: `Add<Rhs>`
24    |
25    = note: because of the default `Self` reference, type parameters must be specified on object types
26
27 error[E0225]: only auto traits can be used as additional traits in a trait object
28   --> $DIR/issue-22560.rs:9:23
29    |
30 LL | type Test = dyn Add + Sub;
31    |                 ---   ^^^ additional non-auto trait
32    |                 |
33    |                 first non-auto trait
34    |
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>
37
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
40    |
41 LL |     type Output;
42    |     ------------ `Output` defined here
43 ...
44 LL |     type Output;
45    |     ------------ `Output` defined here
46 ...
47 LL | type Test = dyn Add + Sub;
48    |                 ^^^   ^^^ associated type `Output` must be specified
49    |                 |
50    |                 associated type `Output` must be specified
51    |
52 help: specify the associated types
53    |
54 LL | type Test = dyn Add<Output = Type> + Sub<Output = Type>;
55    |                 ^^^^^^^^^^^^^^^^^^   ^^^^^^^^^^^^^^^^^^
56
57 error: aborting due to 4 previous errors
58
59 Some errors have detailed explanations: E0191, E0225, E0393.
60 For more information about an error, try `rustc --explain E0191`.