11error[E0271]: type mismatch resolving `<A as Trait>::Associated == ()`
2- --> $DIR/issue-87261.rs:56:5
2+ --> $DIR/issue-87261.rs:56:19
33 |
44LL | accepts_trait(a);
5- | ^^^^^^^^^^^^^ expected `()`, found associated type
5+ | ------------- ^ expected `()`, found associated type
6+ | |
7+ | required by a bound introduced by this call
68 |
79 = note: expected unit type `()`
810 found associated type `<A as Trait>::Associated`
@@ -17,10 +19,12 @@ LL | A: Trait<Associated = ()> + 'static,
1719 | +++++++++++++++++
1820
1921error[E0271]: type mismatch resolving `<B as Trait>::Associated == ()`
20- --> $DIR/issue-87261.rs:59:5
22+ --> $DIR/issue-87261.rs:59:19
2123 |
2224LL | accepts_trait(b);
23- | ^^^^^^^^^^^^^ expected `()`, found associated type
25+ | ------------- ^ expected `()`, found associated type
26+ | |
27+ | required by a bound introduced by this call
2428 |
2529 = note: expected unit type `()`
2630 found associated type `<B as Trait>::Associated`
@@ -33,10 +37,12 @@ LL | fn accepts_trait<T: Trait<Associated = ()>>(_: T) {}
3337 | ^^^^^^^^^^^^^^^ required by this bound in `accepts_trait`
3438
3539error[E0271]: type mismatch resolving `<C as Trait>::Associated == ()`
36- --> $DIR/issue-87261.rs:62:5
40+ --> $DIR/issue-87261.rs:62:19
3741 |
3842LL | accepts_trait(c);
39- | ^^^^^^^^^^^^^ expected `()`, found associated type
43+ | ------------- ^ expected `()`, found associated type
44+ | |
45+ | required by a bound introduced by this call
4046 |
4147 = note: expected unit type `()`
4248 found associated type `<C as Trait>::Associated`
@@ -51,10 +57,12 @@ LL | C: Trait<Associated = ()> + Foo,
5157 | +++++++++++++++++
5258
5359error[E0271]: type mismatch resolving `<D as Trait>::Associated == ()`
54- --> $DIR/issue-87261.rs:65:5
60+ --> $DIR/issue-87261.rs:65:19
5561 |
5662LL | accepts_trait(d);
57- | ^^^^^^^^^^^^^ expected `()`, found associated type
63+ | ------------- ^ expected `()`, found associated type
64+ | |
65+ | required by a bound introduced by this call
5866 |
5967 = note: expected unit type `()`
6068 found associated type `<D as Trait>::Associated`
@@ -67,10 +75,12 @@ LL | fn accepts_trait<T: Trait<Associated = ()>>(_: T) {}
6775 | ^^^^^^^^^^^^^^^ required by this bound in `accepts_trait`
6876
6977error[E0271]: type mismatch resolving `<E as GenericTrait<()>>::Associated == ()`
70- --> $DIR/issue-87261.rs:68:5
78+ --> $DIR/issue-87261.rs:68:27
7179 |
7280LL | accepts_generic_trait(e);
73- | ^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
81+ | --------------------- ^ expected `()`, found associated type
82+ | |
83+ | required by a bound introduced by this call
7484 |
7585 = note: expected unit type `()`
7686 found associated type `<E as GenericTrait<()>>::Associated`
@@ -85,10 +95,12 @@ LL | E: GenericTrait<(), Associated = ()> + 'static,
8595 | +++++++++++++++++
8696
8797error[E0271]: type mismatch resolving `<F as GenericTrait<()>>::Associated == ()`
88- --> $DIR/issue-87261.rs:71:5
98+ --> $DIR/issue-87261.rs:71:27
8999 |
90100LL | accepts_generic_trait(f);
91- | ^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
101+ | --------------------- ^ expected `()`, found associated type
102+ | |
103+ | required by a bound introduced by this call
92104 |
93105 = note: expected unit type `()`
94106 found associated type `<F as GenericTrait<()>>::Associated`
@@ -103,10 +115,12 @@ LL | F: GenericTrait<(), Associated = ()> + Foo,
103115 | +++++++++++++++++
104116
105117error[E0271]: type mismatch resolving `<G as GenericTrait<()>>::Associated == ()`
106- --> $DIR/issue-87261.rs:74:5
118+ --> $DIR/issue-87261.rs:74:27
107119 |
108120LL | accepts_generic_trait(g);
109- | ^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
121+ | --------------------- ^ expected `()`, found associated type
122+ | |
123+ | required by a bound introduced by this call
110124 |
111125 = note: expected unit type `()`
112126 found associated type `<G as GenericTrait<()>>::Associated`
@@ -119,13 +133,15 @@ LL | fn accepts_generic_trait<T: GenericTrait<(), Associated = ()>>(_: T) {}
119133 | ^^^^^^^^^^^^^^^ required by this bound in `accepts_generic_trait`
120134
121135error[E0271]: type mismatch resolving `<impl Trait as Trait>::Associated == ()`
122- --> $DIR/issue-87261.rs:79:5
136+ --> $DIR/issue-87261.rs:79:19
123137 |
124138LL | fn returns_opaque() -> impl Trait + 'static {
125139 | -------------------- the found opaque type
126140...
127141LL | accepts_trait(returns_opaque());
128- | ^^^^^^^^^^^^^ expected `()`, found associated type
142+ | ------------- ^^^^^^^^^^^^^^^^ expected `()`, found associated type
143+ | |
144+ | required by a bound introduced by this call
129145 |
130146 = note: expected unit type `()`
131147 found associated type `<impl Trait as Trait>::Associated`
@@ -140,13 +156,15 @@ LL | fn returns_opaque() -> impl Trait<Associated = ()> + 'static {
140156 | +++++++++++++++++
141157
142158error[E0271]: type mismatch resolving `<impl DerivedTrait as Trait>::Associated == ()`
143- --> $DIR/issue-87261.rs:82:5
159+ --> $DIR/issue-87261.rs:82:19
144160 |
145161LL | fn returns_opaque_derived() -> impl DerivedTrait + 'static {
146162 | --------------------------- the found opaque type
147163...
148164LL | accepts_trait(returns_opaque_derived());
149- | ^^^^^^^^^^^^^ expected `()`, found associated type
165+ | ------------- ^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
166+ | |
167+ | required by a bound introduced by this call
150168 |
151169 = note: expected unit type `()`
152170 found associated type `<impl DerivedTrait as Trait>::Associated`
@@ -161,13 +179,15 @@ LL | fn returns_opaque_derived() -> impl DerivedTrait<Associated = ()> + 'static
161179 | +++++++++++++++++
162180
163181error[E0271]: type mismatch resolving `<impl Trait + Foo as Trait>::Associated == ()`
164- --> $DIR/issue-87261.rs:85:5
182+ --> $DIR/issue-87261.rs:85:19
165183 |
166184LL | fn returns_opaque_foo() -> impl Trait + Foo {
167185 | ---------------- the found opaque type
168186...
169187LL | accepts_trait(returns_opaque_foo());
170- | ^^^^^^^^^^^^^ expected `()`, found associated type
188+ | ------------- ^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
189+ | |
190+ | required by a bound introduced by this call
171191 |
172192 = note: expected unit type `()`
173193 found associated type `<impl Trait + Foo as Trait>::Associated`
@@ -182,13 +202,15 @@ LL | fn returns_opaque_foo() -> impl Trait<Associated = ()> + Foo {
182202 | +++++++++++++++++
183203
184204error[E0271]: type mismatch resolving `<impl DerivedTrait + Foo as Trait>::Associated == ()`
185- --> $DIR/issue-87261.rs:88:5
205+ --> $DIR/issue-87261.rs:88:19
186206 |
187207LL | fn returns_opaque_derived_foo() -> impl DerivedTrait + Foo {
188208 | ----------------------- the found opaque type
189209...
190210LL | accepts_trait(returns_opaque_derived_foo());
191- | ^^^^^^^^^^^^^ expected `()`, found associated type
211+ | ------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
212+ | |
213+ | required by a bound introduced by this call
192214 |
193215 = note: expected unit type `()`
194216 found associated type `<impl DerivedTrait + Foo as Trait>::Associated`
@@ -201,13 +223,15 @@ LL | fn accepts_trait<T: Trait<Associated = ()>>(_: T) {}
201223 | ^^^^^^^^^^^^^^^ required by this bound in `accepts_trait`
202224
203225error[E0271]: type mismatch resolving `<impl GenericTrait<()> as GenericTrait<()>>::Associated == ()`
204- --> $DIR/issue-87261.rs:91:5
226+ --> $DIR/issue-87261.rs:91:27
205227 |
206228LL | fn returns_opaque_generic() -> impl GenericTrait<()> + 'static {
207229 | ------------------------------- the found opaque type
208230...
209231LL | accepts_generic_trait(returns_opaque_generic());
210- | ^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
232+ | --------------------- ^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
233+ | |
234+ | required by a bound introduced by this call
211235 |
212236 = note: expected unit type `()`
213237 found associated type `<impl GenericTrait<()> as GenericTrait<()>>::Associated`
@@ -222,13 +246,15 @@ LL | fn returns_opaque_generic() -> impl GenericTrait<(), Associated = ()> + 'st
222246 | +++++++++++++++++
223247
224248error[E0271]: type mismatch resolving `<impl GenericTrait<()> + Foo as GenericTrait<()>>::Associated == ()`
225- --> $DIR/issue-87261.rs:94:5
249+ --> $DIR/issue-87261.rs:94:27
226250 |
227251LL | fn returns_opaque_generic_foo() -> impl GenericTrait<()> + Foo {
228252 | --------------------------- the found opaque type
229253...
230254LL | accepts_generic_trait(returns_opaque_generic_foo());
231- | ^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
255+ | --------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
256+ | |
257+ | required by a bound introduced by this call
232258 |
233259 = note: expected unit type `()`
234260 found associated type `<impl GenericTrait<()> + Foo as GenericTrait<()>>::Associated`
@@ -243,13 +269,15 @@ LL | fn returns_opaque_generic_foo() -> impl GenericTrait<(), Associated = ()> +
243269 | +++++++++++++++++
244270
245271error[E0271]: type mismatch resolving `<impl GenericTrait<()> + GenericTrait<u8> as GenericTrait<()>>::Associated == ()`
246- --> $DIR/issue-87261.rs:97:5
272+ --> $DIR/issue-87261.rs:97:27
247273 |
248274LL | fn returns_opaque_generic_duplicate() -> impl GenericTrait<()> + GenericTrait<u8> {
249275 | ---------------------------------------- the found opaque type
250276...
251277LL | accepts_generic_trait(returns_opaque_generic_duplicate());
252- | ^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
278+ | --------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
279+ | |
280+ | required by a bound introduced by this call
253281 |
254282 = note: expected unit type `()`
255283 found associated type `<impl GenericTrait<()> + GenericTrait<u8> as GenericTrait<()>>::Associated`
0 commit comments