@@ -8,7 +8,7 @@ LL | fn sum<I: Iterator<Item = ()>>(i: I) -> i32 where I::Item = i32 {
8
8
help: if `Iterator::Item` is an associated type you're trying to set, use the associated type binding syntax
9
9
|
10
10
LL - fn sum<I: Iterator<Item = ()>>(i: I) -> i32 where I::Item = i32 {
11
- LL + fn sum<I: Iterator<Item = (), Item = i32>>(i: I) -> i32 where {
11
+ LL + fn sum<I: Iterator<Item = (), Item = i32>>(i: I) -> i32 {
12
12
|
13
13
14
14
error: equality constraints are not yet supported in `where` clauses
@@ -21,7 +21,7 @@ LL | fn sum2<I: Iterator>(i: I) -> i32 where I::Item = i32 {
21
21
help: if `Iterator::Item` is an associated type you're trying to set, use the associated type binding syntax
22
22
|
23
23
LL - fn sum2<I: Iterator>(i: I) -> i32 where I::Item = i32 {
24
- LL + fn sum2<I: Iterator<Item = i32>>(i: I) -> i32 where {
24
+ LL + fn sum2<I: Iterator<Item = i32>>(i: I) -> i32 {
25
25
|
26
26
27
27
error: equality constraints are not yet supported in `where` clauses
@@ -32,6 +32,138 @@ LL | fn sum3<J: Iterator>(i: J) -> i32 where I::Item = i32 {
32
32
|
33
33
= note: see issue #20041 <https://github.com/rust-lang/rust/issues/20041> for more information
34
34
35
+ error: equality constraints are not yet supported in `where` clauses
36
+ --> $DIR/equality-bound.rs:20:58
37
+ |
38
+ LL | fn from_iter<T>(_: T) -> Self where T: IntoIterator, IntoIterator::Item = A,
39
+ | ^^^^^^^^^^^^^^^^^^^^^^ not supported
40
+ |
41
+ = note: see issue #20041 <https://github.com/rust-lang/rust/issues/20041> for more information
42
+ help: if `IntoIterator::Item` is an associated type you're trying to set, use the associated type binding syntax
43
+ |
44
+ LL - fn from_iter<T>(_: T) -> Self where T: IntoIterator, IntoIterator::Item = A,
45
+ LL + fn from_iter<T>(_: T) -> Self where T: IntoIterator<Item = A>,
46
+ |
47
+
48
+ error: equality constraints are not yet supported in `where` clauses
49
+ --> $DIR/equality-bound.rs:31:58
50
+ |
51
+ LL | fn from_iter<T>(_: T) -> Self where T: IntoIterator, T::Item = A,
52
+ | ^^^^^^^^^^^ not supported
53
+ |
54
+ = note: see issue #20041 <https://github.com/rust-lang/rust/issues/20041> for more information
55
+ help: if `IntoIterator::Item` is an associated type you're trying to set, use the associated type binding syntax
56
+ |
57
+ LL - fn from_iter<T>(_: T) -> Self where T: IntoIterator, T::Item = A,
58
+ LL + fn from_iter<T>(_: T) -> Self where T: IntoIterator<Item = A>,
59
+ |
60
+
61
+ error: equality constraints are not yet supported in `where` clauses
62
+ --> $DIR/equality-bound.rs:42:55
63
+ |
64
+ LL | fn from_iter<T: IntoIterator>(_: T) -> Self where IntoIterator::Item = A,
65
+ | ^^^^^^^^^^^^^^^^^^^^^^ not supported
66
+ |
67
+ = note: see issue #20041 <https://github.com/rust-lang/rust/issues/20041> for more information
68
+ help: if `IntoIterator::Item` is an associated type you're trying to set, use the associated type binding syntax
69
+ |
70
+ LL - fn from_iter<T: IntoIterator>(_: T) -> Self where IntoIterator::Item = A,
71
+ LL + fn from_iter<T: IntoIterator<Item = A>>(_: T) -> Self
72
+ |
73
+
74
+ error: equality constraints are not yet supported in `where` clauses
75
+ --> $DIR/equality-bound.rs:53:55
76
+ |
77
+ LL | fn from_iter<T: IntoIterator>(_: T) -> Self where T::Item = A,
78
+ | ^^^^^^^^^^^ not supported
79
+ |
80
+ = note: see issue #20041 <https://github.com/rust-lang/rust/issues/20041> for more information
81
+ help: if `IntoIterator::Item` is an associated type you're trying to set, use the associated type binding syntax
82
+ |
83
+ LL - fn from_iter<T: IntoIterator>(_: T) -> Self where T::Item = A,
84
+ LL + fn from_iter<T: IntoIterator<Item = A>>(_: T) -> Self
85
+ |
86
+
87
+ error: equality constraints are not yet supported in `where` clauses
88
+ --> $DIR/equality-bound.rs:64:41
89
+ |
90
+ LL | fn from_iter<T>(_: T) -> Self where IntoIterator::Item = A, T: IntoIterator,
91
+ | ^^^^^^^^^^^^^^^^^^^^^^ not supported
92
+ |
93
+ = note: see issue #20041 <https://github.com/rust-lang/rust/issues/20041> for more information
94
+ help: if `IntoIterator::Item` is an associated type you're trying to set, use the associated type binding syntax
95
+ |
96
+ LL - fn from_iter<T>(_: T) -> Self where IntoIterator::Item = A, T: IntoIterator,
97
+ LL + fn from_iter<T>(_: T) -> Self where T: IntoIterator<Item = A>,
98
+ |
99
+
100
+ error: equality constraints are not yet supported in `where` clauses
101
+ --> $DIR/equality-bound.rs:75:41
102
+ |
103
+ LL | fn from_iter<T>(_: T) -> Self where T::Item = A, T: IntoIterator,
104
+ | ^^^^^^^^^^^ not supported
105
+ |
106
+ = note: see issue #20041 <https://github.com/rust-lang/rust/issues/20041> for more information
107
+ help: if `IntoIterator::Item` is an associated type you're trying to set, use the associated type binding syntax
108
+ |
109
+ LL - fn from_iter<T>(_: T) -> Self where T::Item = A, T: IntoIterator,
110
+ LL + fn from_iter<T>(_: T) -> Self where T: IntoIterator<Item = A>,
111
+ |
112
+
113
+ error[E0412]: cannot find type `A` in this scope
114
+ --> $DIR/equality-bound.rs:20:79
115
+ |
116
+ LL | fn from_iter<T>(_: T) -> Self where T: IntoIterator, IntoIterator::Item = A,
117
+ | ^ help: a struct with a similar name exists: `K`
118
+ ...
119
+ LL | struct K {}
120
+ | -------- similarly named struct `K` defined here
121
+
122
+ error[E0412]: cannot find type `A` in this scope
123
+ --> $DIR/equality-bound.rs:31:68
124
+ |
125
+ LL | fn from_iter<T>(_: T) -> Self where T: IntoIterator, T::Item = A,
126
+ | ^ help: a struct with a similar name exists: `K`
127
+ ...
128
+ LL | struct K {}
129
+ | -------- similarly named struct `K` defined here
130
+
131
+ error[E0412]: cannot find type `A` in this scope
132
+ --> $DIR/equality-bound.rs:42:76
133
+ |
134
+ LL | fn from_iter<T: IntoIterator>(_: T) -> Self where IntoIterator::Item = A,
135
+ | ^ help: a struct with a similar name exists: `K`
136
+ ...
137
+ LL | struct K {}
138
+ | -------- similarly named struct `K` defined here
139
+
140
+ error[E0412]: cannot find type `A` in this scope
141
+ --> $DIR/equality-bound.rs:53:65
142
+ |
143
+ LL | struct K {}
144
+ | -------- similarly named struct `K` defined here
145
+ ...
146
+ LL | fn from_iter<T: IntoIterator>(_: T) -> Self where T::Item = A,
147
+ | ^ help: a struct with a similar name exists: `K`
148
+
149
+ error[E0412]: cannot find type `A` in this scope
150
+ --> $DIR/equality-bound.rs:64:62
151
+ |
152
+ LL | struct K {}
153
+ | -------- similarly named struct `K` defined here
154
+ ...
155
+ LL | fn from_iter<T>(_: T) -> Self where IntoIterator::Item = A, T: IntoIterator,
156
+ | ^ help: a struct with a similar name exists: `K`
157
+
158
+ error[E0412]: cannot find type `A` in this scope
159
+ --> $DIR/equality-bound.rs:75:51
160
+ |
161
+ LL | struct K {}
162
+ | -------- similarly named struct `K` defined here
163
+ ...
164
+ LL | fn from_iter<T>(_: T) -> Self where T::Item = A, T: IntoIterator,
165
+ | ^ help: a struct with a similar name exists: `K`
166
+
35
167
error[E0433]: failed to resolve: use of undeclared type `I`
36
168
--> $DIR/equality-bound.rs:9:41
37
169
|
@@ -41,6 +173,7 @@ LL | fn sum3<J: Iterator>(i: J) -> i32 where I::Item = i32 {
41
173
| use of undeclared type `I`
42
174
| help: a type parameter with a similar name exists: `J`
43
175
44
- error: aborting due to 4 previous errors
176
+ error: aborting due to 16 previous errors
45
177
46
- For more information about this error, try `rustc --explain E0433`.
178
+ Some errors have detailed explanations: E0412, E0433.
179
+ For more information about an error, try `rustc --explain E0412`.
0 commit comments