11error[E0282]: type annotations needed
2- --> $DIR/duplicate-bound-err.rs:9 :5
2+ --> $DIR/duplicate-bound-err.rs:15 :5
33 |
44LL | iter::empty()
55 | ^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `empty`
@@ -10,7 +10,7 @@ LL | iter::empty::<T>()
1010 | +++++
1111
1212error[E0282]: type annotations needed
13- --> $DIR/duplicate-bound-err.rs:13 :5
13+ --> $DIR/duplicate-bound-err.rs:19 :5
1414 |
1515LL | iter::empty()
1616 | ^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `empty`
@@ -21,7 +21,7 @@ LL | iter::empty::<T>()
2121 | +++++
2222
2323error[E0282]: type annotations needed
24- --> $DIR/duplicate-bound-err.rs:17 :5
24+ --> $DIR/duplicate-bound-err.rs:23 :5
2525 |
2626LL | iter::empty()
2727 | ^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `empty`
@@ -32,55 +32,55 @@ LL | iter::empty::<T>()
3232 | +++++
3333
3434error: unconstrained opaque type
35- --> $DIR/duplicate-bound-err.rs:21 :51
35+ --> $DIR/duplicate-bound-err.rs:27 :51
3636 |
3737LL | type Tait1<T: Iterator<Item: Copy, Item: Send>> = impl Copy;
3838 | ^^^^^^^^^
3939 |
4040 = note: `Tait1` must be used in combination with a concrete type within the same crate
4141
4242error: unconstrained opaque type
43- --> $DIR/duplicate-bound-err.rs:23 :51
43+ --> $DIR/duplicate-bound-err.rs:29 :51
4444 |
4545LL | type Tait2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy;
4646 | ^^^^^^^^^
4747 |
4848 = note: `Tait2` must be used in combination with a concrete type within the same crate
4949
5050error: unconstrained opaque type
51- --> $DIR/duplicate-bound-err.rs:25 :57
51+ --> $DIR/duplicate-bound-err.rs:31 :57
5252 |
5353LL | type Tait3<T: Iterator<Item: 'static, Item: 'static>> = impl Copy;
5454 | ^^^^^^^^^
5555 |
5656 = note: `Tait3` must be used in combination with a concrete type within the same crate
5757
5858error: unconstrained opaque type
59- --> $DIR/duplicate-bound-err.rs:28 :14
59+ --> $DIR/duplicate-bound-err.rs:34 :14
6060 |
6161LL | type Tait4 = impl Iterator<Item: Copy, Item: Send>;
6262 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6363 |
6464 = note: `Tait4` must be used in combination with a concrete type within the same crate
6565
6666error: unconstrained opaque type
67- --> $DIR/duplicate-bound-err.rs:30 :14
67+ --> $DIR/duplicate-bound-err.rs:36 :14
6868 |
6969LL | type Tait5 = impl Iterator<Item: Copy, Item: Copy>;
7070 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7171 |
7272 = note: `Tait5` must be used in combination with a concrete type within the same crate
7373
7474error: unconstrained opaque type
75- --> $DIR/duplicate-bound-err.rs:32 :14
75+ --> $DIR/duplicate-bound-err.rs:38 :14
7676 |
7777LL | type Tait6 = impl Iterator<Item: 'static, Item: 'static>;
7878 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7979 |
8080 = note: `Tait6` must be used in combination with a concrete type within the same crate
8181
8282error[E0277]: `*const ()` cannot be sent between threads safely
83- --> $DIR/duplicate-bound-err.rs:35 :18
83+ --> $DIR/duplicate-bound-err.rs:41 :18
8484 |
8585LL | fn mismatch() -> impl Iterator<Item: Copy, Item: Send> {
8686 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*const ()` cannot be sent between threads safely
@@ -91,7 +91,7 @@ LL | iter::empty::<*const ()>()
9191 = help: the trait `Send` is not implemented for `*const ()`
9292
9393error[E0277]: the trait bound `String: Copy` is not satisfied
94- --> $DIR/duplicate-bound-err.rs:40 :20
94+ --> $DIR/duplicate-bound-err.rs:46 :20
9595 |
9696LL | fn mismatch_2() -> impl Iterator<Item: Copy, Item: Send> {
9797 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `String`
@@ -100,7 +100,7 @@ LL | iter::empty::<String>()
100100 | ----------------------- return type was inferred to be `std::iter::Empty<String>` here
101101
102102error[E0271]: expected `IntoIter<u32, 1>` to be an iterator that yields `i32`, but it yields `u32`
103- --> $DIR/duplicate-bound-err.rs:100 :17
103+ --> $DIR/duplicate-bound-err.rs:110 :17
104104 |
105105LL | fn foo() -> impl Iterator<Item = i32, Item = u32> {
106106 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `u32`
@@ -109,15 +109,15 @@ LL | [2u32].into_iter()
109109 | ------------------ return type was inferred to be `std::array::IntoIter<u32, 1>` here
110110
111111error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
112- --> $DIR/duplicate-bound-err.rs:77 :42
112+ --> $DIR/duplicate-bound-err.rs:86 :42
113113 |
114114LL | type MustFail = dyn Iterator<Item = i32, Item = u32>;
115115 | ---------- ^^^^^^^^^^ re-bound here
116116 | |
117117 | `Item` bound here first
118118
119119error: conflicting associated type bounds for `Item`
120- --> $DIR/duplicate-bound-err.rs:77 :17
120+ --> $DIR/duplicate-bound-err.rs:86 :17
121121 |
122122LL | type MustFail = dyn Iterator<Item = i32, Item = u32>;
123123 | ^^^^^^^^^^^^^----------^^----------^
@@ -126,15 +126,15 @@ LL | type MustFail = dyn Iterator<Item = i32, Item = u32>;
126126 | `Item` is specified to be `i32` here
127127
128128error[E0719]: the value of the associated type `ASSOC` in trait `Trait2` is already specified
129- --> $DIR/duplicate-bound-err.rs:85 :43
129+ --> $DIR/duplicate-bound-err.rs:95 :43
130130 |
131131LL | type MustFail2 = dyn Trait2<ASSOC = 3u32, ASSOC = 4u32>;
132132 | ------------ ^^^^^^^^^^^^ re-bound here
133133 | |
134134 | `ASSOC` bound here first
135135
136136error: conflicting associated type bounds for `ASSOC`
137- --> $DIR/duplicate-bound-err.rs:85 :18
137+ --> $DIR/duplicate-bound-err.rs:95 :18
138138 |
139139LL | type MustFail2 = dyn Trait2<ASSOC = 3u32, ASSOC = 4u32>;
140140 | ^^^^^^^^^^^------------^^------------^
@@ -143,63 +143,63 @@ LL | type MustFail2 = dyn Trait2<ASSOC = 3u32, ASSOC = 4u32>;
143143 | `ASSOC` is specified to be `3` here
144144
145145error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
146- --> $DIR/duplicate-bound-err.rs:89 :43
146+ --> $DIR/duplicate-bound-err.rs:99 :43
147147 |
148148LL | type MustFail3 = dyn Iterator<Item = i32, Item = i32>;
149149 | ---------- ^^^^^^^^^^ re-bound here
150150 | |
151151 | `Item` bound here first
152152
153153error[E0719]: the value of the associated type `ASSOC` in trait `Trait2` is already specified
154- --> $DIR/duplicate-bound-err.rs:92 :43
154+ --> $DIR/duplicate-bound-err.rs:102 :43
155155 |
156156LL | type MustFail4 = dyn Trait2<ASSOC = 3u32, ASSOC = 3u32>;
157157 | ------------ ^^^^^^^^^^^^ re-bound here
158158 | |
159159 | `ASSOC` bound here first
160160
161161error[E0271]: expected `impl Iterator<Item = u32>` to be an iterator that yields `i32`, but it yields `u32`
162- --> $DIR/duplicate-bound-err.rs:100 :17
162+ --> $DIR/duplicate-bound-err.rs:110 :17
163163 |
164164LL | fn foo() -> impl Iterator<Item = i32, Item = u32> {
165165 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `u32`
166166 |
167167note: required by a bound in `Trait3::foo::{anon_assoc#0}`
168- --> $DIR/duplicate-bound-err.rs:96 :31
168+ --> $DIR/duplicate-bound-err.rs:106 :31
169169 |
170170LL | fn foo() -> impl Iterator<Item = i32, Item = u32>;
171171 | ^^^^^^^^^^ required by this bound in `Trait3::foo::{anon_assoc#0}`
172172
173173error[E0271]: expected `Empty<u32>` to be an iterator that yields `i32`, but it yields `u32`
174- --> $DIR/duplicate-bound-err.rs:108 :16
174+ --> $DIR/duplicate-bound-err.rs:118 :16
175175 |
176176LL | uncallable(iter::empty::<u32>());
177177 | ---------- ^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `u32`
178178 | |
179179 | required by a bound introduced by this call
180180 |
181181note: required by a bound in `uncallable`
182- --> $DIR/duplicate-bound-err.rs:71 :32
182+ --> $DIR/duplicate-bound-err.rs:80 :32
183183 |
184184LL | fn uncallable(_: impl Iterator<Item = i32, Item = u32>) {}
185185 | ^^^^^^^^^^ required by this bound in `uncallable`
186186
187187error[E0271]: expected `Empty<i32>` to be an iterator that yields `u32`, but it yields `i32`
188- --> $DIR/duplicate-bound-err.rs:109 :16
188+ --> $DIR/duplicate-bound-err.rs:119 :16
189189 |
190190LL | uncallable(iter::empty::<i32>());
191191 | ---------- ^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `i32`
192192 | |
193193 | required by a bound introduced by this call
194194 |
195195note: required by a bound in `uncallable`
196- --> $DIR/duplicate-bound-err.rs:71 :44
196+ --> $DIR/duplicate-bound-err.rs:80 :44
197197 |
198198LL | fn uncallable(_: impl Iterator<Item = i32, Item = u32>) {}
199199 | ^^^^^^^^^^ required by this bound in `uncallable`
200200
201201error[E0271]: type mismatch resolving `<() as Trait>::ASSOC == 4`
202- --> $DIR/duplicate-bound-err.rs:110 :22
202+ --> $DIR/duplicate-bound-err.rs:120 :22
203203 |
204204LL | uncallable_const(());
205205 | ---------------- ^^ expected `4`, found `3`
@@ -209,13 +209,13 @@ LL | uncallable_const(());
209209 = note: expected constant `4`
210210 found constant `3`
211211note: required by a bound in `uncallable_const`
212- --> $DIR/duplicate-bound-err.rs:73 :46
212+ --> $DIR/duplicate-bound-err.rs:82 :46
213213 |
214214LL | fn uncallable_const(_: impl Trait<ASSOC = 3, ASSOC = 4>) {}
215215 | ^^^^^^^^^ required by this bound in `uncallable_const`
216216
217217error[E0271]: type mismatch resolving `<u32 as Trait>::ASSOC == 3`
218- --> $DIR/duplicate-bound-err.rs:111 :22
218+ --> $DIR/duplicate-bound-err.rs:121 :22
219219 |
220220LL | uncallable_const(4u32);
221221 | ---------------- ^^^^ expected `3`, found `4`
@@ -225,13 +225,13 @@ LL | uncallable_const(4u32);
225225 = note: expected constant `3`
226226 found constant `4`
227227note: required by a bound in `uncallable_const`
228- --> $DIR/duplicate-bound-err.rs:73 :35
228+ --> $DIR/duplicate-bound-err.rs:82 :35
229229 |
230230LL | fn uncallable_const(_: impl Trait<ASSOC = 3, ASSOC = 4>) {}
231231 | ^^^^^^^^^ required by this bound in `uncallable_const`
232232
233233error[E0271]: type mismatch resolving `<() as Trait>::ASSOC == 4`
234- --> $DIR/duplicate-bound-err.rs:112 :20
234+ --> $DIR/duplicate-bound-err.rs:122 :20
235235 |
236236LL | uncallable_rtn(());
237237 | -------------- ^^ expected `4`, found `3`
@@ -241,13 +241,13 @@ LL | uncallable_rtn(());
241241 = note: expected constant `4`
242242 found constant `3`
243243note: required by a bound in `uncallable_rtn`
244- --> $DIR/duplicate-bound-err.rs:75 :75
244+ --> $DIR/duplicate-bound-err.rs:84 :75
245245 |
246246LL | fn uncallable_rtn(_: impl Trait<foo(..): Trait<ASSOC = 3>, foo(..): Trait<ASSOC = 4>>) {}
247247 | ^^^^^^^^^ required by this bound in `uncallable_rtn`
248248
249249error[E0271]: type mismatch resolving `<u32 as Trait>::ASSOC == 3`
250- --> $DIR/duplicate-bound-err.rs:113 :20
250+ --> $DIR/duplicate-bound-err.rs:123 :20
251251 |
252252LL | uncallable_rtn(17u32);
253253 | -------------- ^^^^^ expected `3`, found `4`
@@ -257,7 +257,7 @@ LL | uncallable_rtn(17u32);
257257 = note: expected constant `3`
258258 found constant `4`
259259note: required by a bound in `uncallable_rtn`
260- --> $DIR/duplicate-bound-err.rs:75 :48
260+ --> $DIR/duplicate-bound-err.rs:84 :48
261261 |
262262LL | fn uncallable_rtn(_: impl Trait<foo(..): Trait<ASSOC = 3>, foo(..): Trait<ASSOC = 4>>) {}
263263 | ^^^^^^^^^ required by this bound in `uncallable_rtn`
0 commit comments