]>
Commit | Line | Data |
---|---|---|
94222f64 | 1 | error[E0271]: type mismatch resolving `<A as Trait>::Associated == ()` |
f2b60f7d | 2 | --> $DIR/issue-87261.rs:56:19 |
94222f64 XL |
3 | | |
4 | LL | accepts_trait(a); | |
f2b60f7d FG |
5 | | ------------- ^ expected `()`, found associated type |
6 | | | | |
7 | | required by a bound introduced by this call | |
94222f64 XL |
8 | | |
9 | = note: expected unit type `()` | |
10 | found associated type `<A as Trait>::Associated` | |
11 | note: required by a bound in `accepts_trait` | |
12 | --> $DIR/issue-87261.rs:43:27 | |
13 | | | |
14 | LL | fn accepts_trait<T: Trait<Associated = ()>>(_: T) {} | |
15 | | ^^^^^^^^^^^^^^^ required by this bound in `accepts_trait` | |
16 | help: consider constraining the associated type `<A as Trait>::Associated` to `()` | |
17 | | | |
18 | LL | A: Trait<Associated = ()> + 'static, | |
19 | | +++++++++++++++++ | |
20 | ||
21 | error[E0271]: type mismatch resolving `<B as Trait>::Associated == ()` | |
f2b60f7d | 22 | --> $DIR/issue-87261.rs:59:19 |
94222f64 XL |
23 | | |
24 | LL | accepts_trait(b); | |
f2b60f7d FG |
25 | | ------------- ^ expected `()`, found associated type |
26 | | | | |
27 | | required by a bound introduced by this call | |
94222f64 XL |
28 | | |
29 | = note: expected unit type `()` | |
30 | found associated type `<B as Trait>::Associated` | |
31 | = help: consider constraining the associated type `<B as Trait>::Associated` to `()` | |
32 | = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html | |
33 | note: required by a bound in `accepts_trait` | |
34 | --> $DIR/issue-87261.rs:43:27 | |
35 | | | |
36 | LL | fn accepts_trait<T: Trait<Associated = ()>>(_: T) {} | |
37 | | ^^^^^^^^^^^^^^^ required by this bound in `accepts_trait` | |
38 | ||
39 | error[E0271]: type mismatch resolving `<C as Trait>::Associated == ()` | |
f2b60f7d | 40 | --> $DIR/issue-87261.rs:62:19 |
94222f64 XL |
41 | | |
42 | LL | accepts_trait(c); | |
f2b60f7d FG |
43 | | ------------- ^ expected `()`, found associated type |
44 | | | | |
45 | | required by a bound introduced by this call | |
94222f64 XL |
46 | | |
47 | = note: expected unit type `()` | |
48 | found associated type `<C as Trait>::Associated` | |
49 | note: required by a bound in `accepts_trait` | |
50 | --> $DIR/issue-87261.rs:43:27 | |
51 | | | |
52 | LL | fn accepts_trait<T: Trait<Associated = ()>>(_: T) {} | |
53 | | ^^^^^^^^^^^^^^^ required by this bound in `accepts_trait` | |
54 | help: consider constraining the associated type `<C as Trait>::Associated` to `()` | |
55 | | | |
56 | LL | C: Trait<Associated = ()> + Foo, | |
57 | | +++++++++++++++++ | |
58 | ||
59 | error[E0271]: type mismatch resolving `<D as Trait>::Associated == ()` | |
f2b60f7d | 60 | --> $DIR/issue-87261.rs:65:19 |
94222f64 XL |
61 | | |
62 | LL | accepts_trait(d); | |
f2b60f7d FG |
63 | | ------------- ^ expected `()`, found associated type |
64 | | | | |
65 | | required by a bound introduced by this call | |
94222f64 XL |
66 | | |
67 | = note: expected unit type `()` | |
68 | found associated type `<D as Trait>::Associated` | |
69 | = help: consider constraining the associated type `<D as Trait>::Associated` to `()` | |
70 | = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html | |
71 | note: required by a bound in `accepts_trait` | |
72 | --> $DIR/issue-87261.rs:43:27 | |
73 | | | |
74 | LL | fn accepts_trait<T: Trait<Associated = ()>>(_: T) {} | |
75 | | ^^^^^^^^^^^^^^^ required by this bound in `accepts_trait` | |
76 | ||
77 | error[E0271]: type mismatch resolving `<E as GenericTrait<()>>::Associated == ()` | |
f2b60f7d | 78 | --> $DIR/issue-87261.rs:68:27 |
94222f64 XL |
79 | | |
80 | LL | accepts_generic_trait(e); | |
f2b60f7d FG |
81 | | --------------------- ^ expected `()`, found associated type |
82 | | | | |
83 | | required by a bound introduced by this call | |
94222f64 XL |
84 | | |
85 | = note: expected unit type `()` | |
86 | found associated type `<E as GenericTrait<()>>::Associated` | |
87 | note: required by a bound in `accepts_generic_trait` | |
88 | --> $DIR/issue-87261.rs:44:46 | |
89 | | | |
90 | LL | fn accepts_generic_trait<T: GenericTrait<(), Associated = ()>>(_: T) {} | |
91 | | ^^^^^^^^^^^^^^^ required by this bound in `accepts_generic_trait` | |
92 | help: consider constraining the associated type `<E as GenericTrait<()>>::Associated` to `()` | |
93 | | | |
94 | LL | E: GenericTrait<(), Associated = ()> + 'static, | |
95 | | +++++++++++++++++ | |
96 | ||
97 | error[E0271]: type mismatch resolving `<F as GenericTrait<()>>::Associated == ()` | |
f2b60f7d | 98 | --> $DIR/issue-87261.rs:71:27 |
94222f64 XL |
99 | | |
100 | LL | accepts_generic_trait(f); | |
f2b60f7d FG |
101 | | --------------------- ^ expected `()`, found associated type |
102 | | | | |
103 | | required by a bound introduced by this call | |
94222f64 XL |
104 | | |
105 | = note: expected unit type `()` | |
106 | found associated type `<F as GenericTrait<()>>::Associated` | |
107 | note: required by a bound in `accepts_generic_trait` | |
108 | --> $DIR/issue-87261.rs:44:46 | |
109 | | | |
110 | LL | fn accepts_generic_trait<T: GenericTrait<(), Associated = ()>>(_: T) {} | |
111 | | ^^^^^^^^^^^^^^^ required by this bound in `accepts_generic_trait` | |
112 | help: consider constraining the associated type `<F as GenericTrait<()>>::Associated` to `()` | |
113 | | | |
114 | LL | F: GenericTrait<(), Associated = ()> + Foo, | |
115 | | +++++++++++++++++ | |
116 | ||
117 | error[E0271]: type mismatch resolving `<G as GenericTrait<()>>::Associated == ()` | |
f2b60f7d | 118 | --> $DIR/issue-87261.rs:74:27 |
94222f64 XL |
119 | | |
120 | LL | accepts_generic_trait(g); | |
f2b60f7d FG |
121 | | --------------------- ^ expected `()`, found associated type |
122 | | | | |
123 | | required by a bound introduced by this call | |
94222f64 XL |
124 | | |
125 | = note: expected unit type `()` | |
126 | found associated type `<G as GenericTrait<()>>::Associated` | |
127 | = help: consider constraining the associated type `<G as GenericTrait<()>>::Associated` to `()` | |
128 | = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html | |
129 | note: required by a bound in `accepts_generic_trait` | |
130 | --> $DIR/issue-87261.rs:44:46 | |
131 | | | |
132 | LL | fn accepts_generic_trait<T: GenericTrait<(), Associated = ()>>(_: T) {} | |
133 | | ^^^^^^^^^^^^^^^ required by this bound in `accepts_generic_trait` | |
134 | ||
2b03887a | 135 | error[E0271]: type mismatch resolving `<impl Trait + 'static as Trait>::Associated == ()` |
f2b60f7d | 136 | --> $DIR/issue-87261.rs:79:19 |
94222f64 XL |
137 | | |
138 | LL | fn returns_opaque() -> impl Trait + 'static { | |
139 | | -------------------- the found opaque type | |
140 | ... | |
141 | LL | accepts_trait(returns_opaque()); | |
f2b60f7d FG |
142 | | ------------- ^^^^^^^^^^^^^^^^ expected `()`, found associated type |
143 | | | | |
144 | | required by a bound introduced by this call | |
94222f64 XL |
145 | | |
146 | = note: expected unit type `()` | |
2b03887a | 147 | found associated type `<impl Trait + 'static as Trait>::Associated` |
94222f64 XL |
148 | note: required by a bound in `accepts_trait` |
149 | --> $DIR/issue-87261.rs:43:27 | |
150 | | | |
151 | LL | fn accepts_trait<T: Trait<Associated = ()>>(_: T) {} | |
152 | | ^^^^^^^^^^^^^^^ required by this bound in `accepts_trait` | |
2b03887a | 153 | help: consider constraining the associated type `<impl Trait + 'static as Trait>::Associated` to `()` |
94222f64 XL |
154 | | |
155 | LL | fn returns_opaque() -> impl Trait<Associated = ()> + 'static { | |
156 | | +++++++++++++++++ | |
157 | ||
2b03887a | 158 | error[E0271]: type mismatch resolving `<impl DerivedTrait + 'static as Trait>::Associated == ()` |
f2b60f7d | 159 | --> $DIR/issue-87261.rs:82:19 |
94222f64 XL |
160 | | |
161 | LL | fn returns_opaque_derived() -> impl DerivedTrait + 'static { | |
162 | | --------------------------- the found opaque type | |
163 | ... | |
164 | LL | accepts_trait(returns_opaque_derived()); | |
f2b60f7d FG |
165 | | ------------- ^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type |
166 | | | | |
167 | | required by a bound introduced by this call | |
94222f64 XL |
168 | | |
169 | = note: expected unit type `()` | |
2b03887a | 170 | found associated type `<impl DerivedTrait + 'static as Trait>::Associated` |
94222f64 XL |
171 | note: required by a bound in `accepts_trait` |
172 | --> $DIR/issue-87261.rs:43:27 | |
173 | | | |
174 | LL | fn accepts_trait<T: Trait<Associated = ()>>(_: T) {} | |
175 | | ^^^^^^^^^^^^^^^ required by this bound in `accepts_trait` | |
2b03887a | 176 | help: consider constraining the associated type `<impl DerivedTrait + 'static as Trait>::Associated` to `()` |
94222f64 XL |
177 | | |
178 | LL | fn returns_opaque_derived() -> impl DerivedTrait<Associated = ()> + 'static { | |
179 | | +++++++++++++++++ | |
180 | ||
923072b8 | 181 | error[E0271]: type mismatch resolving `<impl Trait + Foo as Trait>::Associated == ()` |
f2b60f7d | 182 | --> $DIR/issue-87261.rs:85:19 |
94222f64 XL |
183 | | |
184 | LL | fn returns_opaque_foo() -> impl Trait + Foo { | |
185 | | ---------------- the found opaque type | |
186 | ... | |
187 | LL | accepts_trait(returns_opaque_foo()); | |
f2b60f7d FG |
188 | | ------------- ^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type |
189 | | | | |
190 | | required by a bound introduced by this call | |
94222f64 XL |
191 | | |
192 | = note: expected unit type `()` | |
923072b8 | 193 | found associated type `<impl Trait + Foo as Trait>::Associated` |
94222f64 XL |
194 | note: required by a bound in `accepts_trait` |
195 | --> $DIR/issue-87261.rs:43:27 | |
196 | | | |
197 | LL | fn accepts_trait<T: Trait<Associated = ()>>(_: T) {} | |
198 | | ^^^^^^^^^^^^^^^ required by this bound in `accepts_trait` | |
923072b8 | 199 | help: consider constraining the associated type `<impl Trait + Foo as Trait>::Associated` to `()` |
94222f64 XL |
200 | | |
201 | LL | fn returns_opaque_foo() -> impl Trait<Associated = ()> + Foo { | |
202 | | +++++++++++++++++ | |
203 | ||
923072b8 | 204 | error[E0271]: type mismatch resolving `<impl DerivedTrait + Foo as Trait>::Associated == ()` |
f2b60f7d | 205 | --> $DIR/issue-87261.rs:88:19 |
94222f64 XL |
206 | | |
207 | LL | fn returns_opaque_derived_foo() -> impl DerivedTrait + Foo { | |
208 | | ----------------------- the found opaque type | |
209 | ... | |
210 | LL | accepts_trait(returns_opaque_derived_foo()); | |
f2b60f7d FG |
211 | | ------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type |
212 | | | | |
213 | | required by a bound introduced by this call | |
94222f64 XL |
214 | | |
215 | = note: expected unit type `()` | |
923072b8 FG |
216 | found associated type `<impl DerivedTrait + Foo as Trait>::Associated` |
217 | = help: consider constraining the associated type `<impl DerivedTrait + Foo as Trait>::Associated` to `()` | |
94222f64 XL |
218 | = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html |
219 | note: required by a bound in `accepts_trait` | |
220 | --> $DIR/issue-87261.rs:43:27 | |
221 | | | |
222 | LL | fn accepts_trait<T: Trait<Associated = ()>>(_: T) {} | |
223 | | ^^^^^^^^^^^^^^^ required by this bound in `accepts_trait` | |
224 | ||
2b03887a | 225 | error[E0271]: type mismatch resolving `<impl GenericTrait<()> + 'static as GenericTrait<()>>::Associated == ()` |
f2b60f7d | 226 | --> $DIR/issue-87261.rs:91:27 |
94222f64 XL |
227 | | |
228 | LL | fn returns_opaque_generic() -> impl GenericTrait<()> + 'static { | |
229 | | ------------------------------- the found opaque type | |
230 | ... | |
231 | LL | accepts_generic_trait(returns_opaque_generic()); | |
f2b60f7d FG |
232 | | --------------------- ^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type |
233 | | | | |
234 | | required by a bound introduced by this call | |
94222f64 XL |
235 | | |
236 | = note: expected unit type `()` | |
2b03887a | 237 | found associated type `<impl GenericTrait<()> + 'static as GenericTrait<()>>::Associated` |
94222f64 XL |
238 | note: required by a bound in `accepts_generic_trait` |
239 | --> $DIR/issue-87261.rs:44:46 | |
240 | | | |
241 | LL | fn accepts_generic_trait<T: GenericTrait<(), Associated = ()>>(_: T) {} | |
242 | | ^^^^^^^^^^^^^^^ required by this bound in `accepts_generic_trait` | |
2b03887a | 243 | help: consider constraining the associated type `<impl GenericTrait<()> + 'static as GenericTrait<()>>::Associated` to `()` |
94222f64 XL |
244 | | |
245 | LL | fn returns_opaque_generic() -> impl GenericTrait<(), Associated = ()> + 'static { | |
246 | | +++++++++++++++++ | |
247 | ||
923072b8 | 248 | error[E0271]: type mismatch resolving `<impl GenericTrait<()> + Foo as GenericTrait<()>>::Associated == ()` |
f2b60f7d | 249 | --> $DIR/issue-87261.rs:94:27 |
94222f64 XL |
250 | | |
251 | LL | fn returns_opaque_generic_foo() -> impl GenericTrait<()> + Foo { | |
252 | | --------------------------- the found opaque type | |
253 | ... | |
254 | LL | accepts_generic_trait(returns_opaque_generic_foo()); | |
f2b60f7d FG |
255 | | --------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type |
256 | | | | |
257 | | required by a bound introduced by this call | |
94222f64 XL |
258 | | |
259 | = note: expected unit type `()` | |
923072b8 | 260 | found associated type `<impl GenericTrait<()> + Foo as GenericTrait<()>>::Associated` |
94222f64 XL |
261 | note: required by a bound in `accepts_generic_trait` |
262 | --> $DIR/issue-87261.rs:44:46 | |
263 | | | |
264 | LL | fn accepts_generic_trait<T: GenericTrait<(), Associated = ()>>(_: T) {} | |
265 | | ^^^^^^^^^^^^^^^ required by this bound in `accepts_generic_trait` | |
923072b8 | 266 | help: consider constraining the associated type `<impl GenericTrait<()> + Foo as GenericTrait<()>>::Associated` to `()` |
94222f64 XL |
267 | | |
268 | LL | fn returns_opaque_generic_foo() -> impl GenericTrait<(), Associated = ()> + Foo { | |
269 | | +++++++++++++++++ | |
270 | ||
923072b8 | 271 | error[E0271]: type mismatch resolving `<impl GenericTrait<()> + GenericTrait<u8> as GenericTrait<()>>::Associated == ()` |
f2b60f7d | 272 | --> $DIR/issue-87261.rs:97:27 |
94222f64 XL |
273 | | |
274 | LL | fn returns_opaque_generic_duplicate() -> impl GenericTrait<()> + GenericTrait<u8> { | |
275 | | ---------------------------------------- the found opaque type | |
276 | ... | |
277 | LL | accepts_generic_trait(returns_opaque_generic_duplicate()); | |
f2b60f7d FG |
278 | | --------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type |
279 | | | | |
280 | | required by a bound introduced by this call | |
94222f64 XL |
281 | | |
282 | = note: expected unit type `()` | |
923072b8 FG |
283 | found associated type `<impl GenericTrait<()> + GenericTrait<u8> as GenericTrait<()>>::Associated` |
284 | = help: consider constraining the associated type `<impl GenericTrait<()> + GenericTrait<u8> as GenericTrait<()>>::Associated` to `()` | |
94222f64 XL |
285 | = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html |
286 | note: required by a bound in `accepts_generic_trait` | |
287 | --> $DIR/issue-87261.rs:44:46 | |
288 | | | |
289 | LL | fn accepts_generic_trait<T: GenericTrait<(), Associated = ()>>(_: T) {} | |
290 | | ^^^^^^^^^^^^^^^ required by this bound in `accepts_generic_trait` | |
291 | ||
292 | error: aborting due to 14 previous errors | |
293 | ||
294 | For more information about this error, try `rustc --explain E0271`. |