summaryrefslogtreecommitdiffstats
path: root/src/test/ui/associated-types/missing-associated-types.stderr
blob: f617df984ae35e2b1b2a1fb05c2c5b330d82d176 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
error[E0225]: only auto traits can be used as additional traits in a trait object
  --> $DIR/missing-associated-types.rs:12:32
   |
LL | type Foo<Rhs> = dyn Add<Rhs> + Sub<Rhs> + X<Rhs> + Y<Rhs>;
   |                     --------   ^^^^^^^^ additional non-auto trait
   |                     |
   |                     first non-auto trait
   |
   = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Add<Rhs> + Sub<Rhs> + X<Rhs> + Y<Rhs> {}`
   = 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>

error[E0191]: the value of the associated types `A` (from trait `Y`), `Output` (from trait `Add`), `Output` (from trait `Mul`), `Output` (from trait `Sub`) must be specified
  --> $DIR/missing-associated-types.rs:12:21
   |
LL |     type A;
   |     ------ `A` defined here
...
LL | type Foo<Rhs> = dyn Add<Rhs> + Sub<Rhs> + X<Rhs> + Y<Rhs>;
   |                     ^^^^^^^^   ^^^^^^^^   ^^^^^^   ^^^^^^ associated type `A` must be specified
   |                     |          |          |
   |                     |          |          associated type `Output` must be specified
   |                     |          associated type `Output` must be specified
   |                     associated type `Output` must be specified
   |
help: specify the associated types
   |
LL | type Foo<Rhs> = dyn Add<Rhs, Output = Type> + Sub<Rhs, Output = Type> + X<Rhs, Output = Type> + Y<Rhs, A = Type>;
   |                     ~~~~~~~~~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~

error[E0225]: only auto traits can be used as additional traits in a trait object
  --> $DIR/missing-associated-types.rs:15:32
   |
LL | type Bar<Rhs> = dyn Add<Rhs> + Sub<Rhs> + X<Rhs> + Z<Rhs>;
   |                     --------   ^^^^^^^^ additional non-auto trait
   |                     |
   |                     first non-auto trait
   |
   = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Add<Rhs> + Sub<Rhs> + X<Rhs> + Z<Rhs> {}`
   = 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>

error[E0191]: the value of the associated types `A` (from trait `Z`), `B` (from trait `Z`), `Output` (from trait `Add`), `Output` (from trait `Div`), `Output` (from trait `Div`), `Output` (from trait `Mul`), `Output` (from trait `Sub`) must be specified
  --> $DIR/missing-associated-types.rs:15:21
   |
LL |     type A;
   |     ------ `A` defined here
LL |     type B;
   |     ------ `B` defined here
...
LL | type Bar<Rhs> = dyn Add<Rhs> + Sub<Rhs> + X<Rhs> + Z<Rhs>;
   |                     ^^^^^^^^   ^^^^^^^^   ^^^^^^   ^^^^^^ associated types `A`, `B`, `Output` must be specified
   |                     |          |          |
   |                     |          |          associated types `Output` (from trait `Mul`), `Output` (from trait `Div`) must be specified
   |                     |          associated type `Output` must be specified
   |                     associated type `Output` must be specified
   |
help: consider introducing a new type parameter, adding `where` constraints using the fully-qualified path to the associated types
  --> $DIR/missing-associated-types.rs:15:43
   |
LL | type Bar<Rhs> = dyn Add<Rhs> + Sub<Rhs> + X<Rhs> + Z<Rhs>;
   |                                           ^^^^^^
help: specify the associated types
   |
LL | type Bar<Rhs> = dyn Add<Rhs, Output = Type> + Sub<Rhs, Output = Type> + X<Rhs> + Z<Rhs, A = Type, B = Type, Output = Type>;
   |                     ~~~~~~~~~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error[E0225]: only auto traits can be used as additional traits in a trait object
  --> $DIR/missing-associated-types.rs:18:32
   |
LL | type Baz<Rhs> = dyn Add<Rhs> + Sub<Rhs> + Y<Rhs>;
   |                     --------   ^^^^^^^^ additional non-auto trait
   |                     |
   |                     first non-auto trait
   |
   = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Add<Rhs> + Sub<Rhs> + Y<Rhs> {}`
   = 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>

error[E0191]: the value of the associated types `A` (from trait `Y`), `Output` (from trait `Add`), `Output` (from trait `Sub`) must be specified
  --> $DIR/missing-associated-types.rs:18:21
   |
LL |     type A;
   |     ------ `A` defined here
...
LL | type Baz<Rhs> = dyn Add<Rhs> + Sub<Rhs> + Y<Rhs>;
   |                     ^^^^^^^^   ^^^^^^^^   ^^^^^^ associated type `A` must be specified
   |                     |          |
   |                     |          associated type `Output` must be specified
   |                     associated type `Output` must be specified
   |
help: specify the associated types
   |
LL | type Baz<Rhs> = dyn Add<Rhs, Output = Type> + Sub<Rhs, Output = Type> + Y<Rhs, A = Type>;
   |                     ~~~~~~~~~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~

error[E0225]: only auto traits can be used as additional traits in a trait object
  --> $DIR/missing-associated-types.rs:21:32
   |
LL | type Bat<Rhs> = dyn Add<Rhs> + Sub<Rhs> + Fine<Rhs>;
   |                     --------   ^^^^^^^^ additional non-auto trait
   |                     |
   |                     first non-auto trait
   |
   = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Add<Rhs> + Sub<Rhs> + Fine<Rhs> {}`
   = 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>

error[E0191]: the value of the associated types `Output` (from trait `Add`), `Output` (from trait `Sub`) must be specified
  --> $DIR/missing-associated-types.rs:21:21
   |
LL | type Bat<Rhs> = dyn Add<Rhs> + Sub<Rhs> + Fine<Rhs>;
   |                     ^^^^^^^^   ^^^^^^^^ associated type `Output` must be specified
   |                     |
   |                     associated type `Output` must be specified
   |
help: specify the associated types
   |
LL | type Bat<Rhs> = dyn Add<Rhs, Output = Type> + Sub<Rhs, Output = Type> + Fine<Rhs>;
   |                     ~~~~~~~~~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~

error[E0191]: the value of the associated types `Output` (from trait `Div`), `Output` (from trait `Mul`) must be specified
  --> $DIR/missing-associated-types.rs:24:21
   |
LL | type Bal<Rhs> = dyn X<Rhs>;
   |                     ^^^^^^ associated types `Output` (from trait `Mul`), `Output` (from trait `Div`) must be specified
   |
   = help: consider introducing a new type parameter, adding `where` constraints using the fully-qualified path to the associated types

error: aborting due to 9 previous errors

Some errors have detailed explanations: E0191, E0225.
For more information about an error, try `rustc --explain E0191`.