]> git.lizzy.rs Git - rust.git/blob - tests/ui/errors/traits/blame-trait-error-spans-on-exprs.stderr
Point at specific field in struct literal when trait fulfillment fails
[rust.git] / tests / ui / errors / traits / blame-trait-error-spans-on-exprs.stderr
1 error[E0277]: the trait bound `Q: T3` is not satisfied
2   --> $DIR/blame-trait-error-spans-on-exprs.rs:79:60
3    |
4 LL |     want(Wrapper { value: Burrito { spicy: false, filling: q } });
5    |     ---- required by a bound introduced by this call       ^ the trait `T3` is not implemented for `Q`
6    |
7 note: required for `Burrito<Q>` to implement `T2`
8   --> $DIR/blame-trait-error-spans-on-exprs.rs:22:13
9    |
10 LL | impl<A: T3> T2 for Burrito<A> {}
11    |         --  ^^     ^^^^^^^^^^
12    |         |
13    |         unsatisfied trait bound introduced here
14 note: required for `Wrapper<Burrito<Q>>` to implement `T1`
15   --> $DIR/blame-trait-error-spans-on-exprs.rs:16:13
16    |
17 LL | impl<B: T2> T1 for Wrapper<B> {}
18    |         --  ^^     ^^^^^^^^^^
19    |         |
20    |         unsatisfied trait bound introduced here
21 note: required by a bound in `want`
22   --> $DIR/blame-trait-error-spans-on-exprs.rs:53:12
23    |
24 LL | fn want<V: T1>(_x: V) {}
25    |            ^^ required by this bound in `want`
26 help: consider restricting type parameter `Q`
27    |
28 LL | fn example<Q: T3>(q: Q) {
29    |             ++++
30
31 error[E0277]: the trait bound `Q: T3` is not satisfied
32   --> $DIR/blame-trait-error-spans-on-exprs.rs:83:84
33    |
34 LL |     want(Wrapper { value: BurritoKinds::SmallBurrito { spicy: true, small_filling: q } });
35    |     ---- required by a bound introduced by this call                               ^ the trait `T3` is not implemented for `Q`
36    |
37 note: required for `BurritoKinds<Q>` to implement `T2`
38   --> $DIR/blame-trait-error-spans-on-exprs.rs:32:13
39    |
40 LL | impl<D: T3> T2 for BurritoKinds<D> {}
41    |         --  ^^     ^^^^^^^^^^^^^^^
42    |         |
43    |         unsatisfied trait bound introduced here
44 note: required for `Wrapper<BurritoKinds<Q>>` to implement `T1`
45   --> $DIR/blame-trait-error-spans-on-exprs.rs:16:13
46    |
47 LL | impl<B: T2> T1 for Wrapper<B> {}
48    |         --  ^^     ^^^^^^^^^^
49    |         |
50    |         unsatisfied trait bound introduced here
51 note: required by a bound in `want`
52   --> $DIR/blame-trait-error-spans-on-exprs.rs:53:12
53    |
54 LL | fn want<V: T1>(_x: V) {}
55    |            ^^ required by this bound in `want`
56 help: consider restricting type parameter `Q`
57    |
58 LL | fn example<Q: T3>(q: Q) {
59    |             ++++
60
61 error[E0277]: the trait bound `Q: T3` is not satisfied
62   --> $DIR/blame-trait-error-spans-on-exprs.rs:87:39
63    |
64 LL |     want(Wrapper { value: Taco(false, q) });
65    |     ----                              ^ the trait `T3` is not implemented for `Q`
66    |     |
67    |     required by a bound introduced by this call
68    |
69 note: required for `Taco<Q>` to implement `T2`
70   --> $DIR/blame-trait-error-spans-on-exprs.rs:35:13
71    |
72 LL | impl<E: T3> T2 for Taco<E> {}
73    |         --  ^^     ^^^^^^^
74    |         |
75    |         unsatisfied trait bound introduced here
76 note: required for `Wrapper<Taco<Q>>` to implement `T1`
77   --> $DIR/blame-trait-error-spans-on-exprs.rs:16:13
78    |
79 LL | impl<B: T2> T1 for Wrapper<B> {}
80    |         --  ^^     ^^^^^^^^^^
81    |         |
82    |         unsatisfied trait bound introduced here
83 note: required by a bound in `want`
84   --> $DIR/blame-trait-error-spans-on-exprs.rs:53:12
85    |
86 LL | fn want<V: T1>(_x: V) {}
87    |            ^^ required by this bound in `want`
88 help: consider restricting type parameter `Q`
89    |
90 LL | fn example<Q: T3>(q: Q) {
91    |             ++++
92
93 error[E0277]: the trait bound `Q: T3` is not satisfied
94   --> $DIR/blame-trait-error-spans-on-exprs.rs:91:27
95    |
96 LL |     want(Wrapper { value: TacoKinds::OneTaco(false, q) });
97    |     ----                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `T3` is not implemented for `Q`
98    |     |
99    |     required by a bound introduced by this call
100    |
101 note: required for `TacoKinds<Q>` to implement `T2`
102   --> $DIR/blame-trait-error-spans-on-exprs.rs:41:13
103    |
104 LL | impl<F: T3> T2 for TacoKinds<F> {}
105    |         --  ^^     ^^^^^^^^^^^^
106    |         |
107    |         unsatisfied trait bound introduced here
108 note: required for `Wrapper<TacoKinds<Q>>` to implement `T1`
109   --> $DIR/blame-trait-error-spans-on-exprs.rs:16:13
110    |
111 LL | impl<B: T2> T1 for Wrapper<B> {}
112    |         --  ^^     ^^^^^^^^^^
113    |         |
114    |         unsatisfied trait bound introduced here
115 note: required by a bound in `want`
116   --> $DIR/blame-trait-error-spans-on-exprs.rs:53:12
117    |
118 LL | fn want<V: T1>(_x: V) {}
119    |            ^^ required by this bound in `want`
120 help: consider restricting type parameter `Q`
121    |
122 LL | fn example<Q: T3>(q: Q) {
123    |             ++++
124
125 error[E0277]: the trait bound `Q: T3` is not satisfied
126   --> $DIR/blame-trait-error-spans-on-exprs.rs:95:74
127    |
128 LL |     want(Wrapper { value: GenericBurrito { spiciness: NotSpicy, filling: q } });
129    |     ---- required by a bound introduced by this call                     ^ the trait `T3` is not implemented for `Q`
130    |
131 note: required for `GenericBurrito<NotSpicy, Q>` to implement `T2`
132   --> $DIR/blame-trait-error-spans-on-exprs.rs:47:16
133    |
134 LL | impl<X, Y: T3> T2 for GenericBurrito<X, Y> {}
135    |            --  ^^     ^^^^^^^^^^^^^^^^^^^^
136    |            |
137    |            unsatisfied trait bound introduced here
138 note: required for `Wrapper<GenericBurrito<NotSpicy, Q>>` to implement `T1`
139   --> $DIR/blame-trait-error-spans-on-exprs.rs:16:13
140    |
141 LL | impl<B: T2> T1 for Wrapper<B> {}
142    |         --  ^^     ^^^^^^^^^^
143    |         |
144    |         unsatisfied trait bound introduced here
145 note: required by a bound in `want`
146   --> $DIR/blame-trait-error-spans-on-exprs.rs:53:12
147    |
148 LL | fn want<V: T1>(_x: V) {}
149    |            ^^ required by this bound in `want`
150 help: consider restricting type parameter `Q`
151    |
152 LL | fn example<Q: T3>(q: Q) {
153    |             ++++
154
155 error[E0277]: the trait bound `Q: T2` is not satisfied
156   --> $DIR/blame-trait-error-spans-on-exprs.rs:99:14
157    |
158 LL |     want((3, q));
159    |     ----     ^ the trait `T2` is not implemented for `Q`
160    |     |
161    |     required by a bound introduced by this call
162    |
163 note: required for `(i32, Q)` to implement `T1`
164   --> $DIR/blame-trait-error-spans-on-exprs.rs:51:20
165    |
166 LL | impl<A: T2, B: T2> T1 for (A, B) {}
167    |                --  ^^     ^^^^^^
168    |                |
169    |                unsatisfied trait bound introduced here
170 note: required by a bound in `want`
171   --> $DIR/blame-trait-error-spans-on-exprs.rs:53:12
172    |
173 LL | fn want<V: T1>(_x: V) {}
174    |            ^^ required by this bound in `want`
175 help: consider restricting type parameter `Q`
176    |
177 LL | fn example<Q: T2>(q: Q) {
178    |             ++++
179
180 error[E0277]: the trait bound `Q: T3` is not satisfied
181   --> $DIR/blame-trait-error-spans-on-exprs.rs:103:31
182    |
183 LL |     want(Wrapper { value: (3, q) });
184    |     ----                      ^ the trait `T3` is not implemented for `Q`
185    |     |
186    |     required by a bound introduced by this call
187    |
188 note: required for `(i32, Q)` to implement `T2`
189   --> $DIR/blame-trait-error-spans-on-exprs.rs:50:20
190    |
191 LL | impl<A: T3, B: T3> T2 for (A, B) {}
192    |                --  ^^     ^^^^^^
193    |                |
194    |                unsatisfied trait bound introduced here
195 note: required for `Wrapper<(i32, Q)>` to implement `T1`
196   --> $DIR/blame-trait-error-spans-on-exprs.rs:16:13
197    |
198 LL | impl<B: T2> T1 for Wrapper<B> {}
199    |         --  ^^     ^^^^^^^^^^
200    |         |
201    |         unsatisfied trait bound introduced here
202 note: required by a bound in `want`
203   --> $DIR/blame-trait-error-spans-on-exprs.rs:53:12
204    |
205 LL | fn want<V: T1>(_x: V) {}
206    |            ^^ required by this bound in `want`
207 help: consider restricting type parameter `Q`
208    |
209 LL | fn example<Q: T3>(q: Q) {
210    |             ++++
211
212 error[E0277]: the trait bound `Q: T3` is not satisfied
213   --> $DIR/blame-trait-error-spans-on-exprs.rs:107:15
214    |
215 LL |     want(((3, q), 5));
216    |     ----      ^ the trait `T3` is not implemented for `Q`
217    |     |
218    |     required by a bound introduced by this call
219    |
220 note: required for `(i32, Q)` to implement `T2`
221   --> $DIR/blame-trait-error-spans-on-exprs.rs:50:20
222    |
223 LL | impl<A: T3, B: T3> T2 for (A, B) {}
224    |                --  ^^     ^^^^^^
225    |                |
226    |                unsatisfied trait bound introduced here
227 note: required for `((i32, Q), i32)` to implement `T1`
228   --> $DIR/blame-trait-error-spans-on-exprs.rs:51:20
229    |
230 LL | impl<A: T2, B: T2> T1 for (A, B) {}
231    |         --         ^^     ^^^^^^
232    |         |
233    |         unsatisfied trait bound introduced here
234 note: required by a bound in `want`
235   --> $DIR/blame-trait-error-spans-on-exprs.rs:53:12
236    |
237 LL | fn want<V: T1>(_x: V) {}
238    |            ^^ required by this bound in `want`
239 help: consider restricting type parameter `Q`
240    |
241 LL | fn example<Q: T3>(q: Q) {
242    |             ++++
243
244 error[E0277]: the trait bound `Q: T1` is not satisfied
245   --> $DIR/blame-trait-error-spans-on-exprs.rs:110:49
246    |
247 LL |     want(DoubleWrapper { item: Wrapper { value: q } });
248    |     ----                                        ^ the trait `T1` is not implemented for `Q`
249    |     |
250    |     required by a bound introduced by this call
251    |
252 note: required for `DoubleWrapper<Q>` to implement `T1`
253   --> $DIR/blame-trait-error-spans-on-exprs.rs:72:13
254    |
255 LL | impl<T: T1> T1 for DoubleWrapper<T> {}
256    |         --  ^^     ^^^^^^^^^^^^^^^^
257    |         |
258    |         unsatisfied trait bound introduced here
259 note: required by a bound in `want`
260   --> $DIR/blame-trait-error-spans-on-exprs.rs:53:12
261    |
262 LL | fn want<V: T1>(_x: V) {}
263    |            ^^ required by this bound in `want`
264 help: consider restricting type parameter `Q`
265    |
266 LL | fn example<Q: T1>(q: Q) {
267    |             ++++
268
269 error[E0277]: the trait bound `Q: T1` is not satisfied
270   --> $DIR/blame-trait-error-spans-on-exprs.rs:113:88
271    |
272 LL |     want(DoubleWrapper { item: Wrapper { value: DoubleWrapper { item: Wrapper { value: q } } } });
273    |     ---- required by a bound introduced by this call                                   ^ the trait `T1` is not implemented for `Q`
274    |
275 note: required for `DoubleWrapper<Q>` to implement `T1`
276   --> $DIR/blame-trait-error-spans-on-exprs.rs:72:13
277    |
278 LL | impl<T: T1> T1 for DoubleWrapper<T> {}
279    |         --  ^^     ^^^^^^^^^^^^^^^^
280    |         |
281    |         unsatisfied trait bound introduced here
282    = note: 1 redundant requirement hidden
283    = note: required for `DoubleWrapper<DoubleWrapper<Q>>` to implement `T1`
284 note: required by a bound in `want`
285   --> $DIR/blame-trait-error-spans-on-exprs.rs:53:12
286    |
287 LL | fn want<V: T1>(_x: V) {}
288    |            ^^ required by this bound in `want`
289 help: consider restricting type parameter `Q`
290    |
291 LL | fn example<Q: T1>(q: Q) {
292    |             ++++
293
294 error[E0277]: the trait bound `Q: T3` is not satisfied
295   --> $DIR/blame-trait-error-spans-on-exprs.rs:117:27
296    |
297 LL |     want(Wrapper { value: AliasBurrito { spiciness: q, filling: q } });
298    |     ----                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `T3` is not implemented for `Q`
299    |     |
300    |     required by a bound introduced by this call
301    |
302 note: required for `GenericBurrito<Q, Q>` to implement `T2`
303   --> $DIR/blame-trait-error-spans-on-exprs.rs:47:16
304    |
305 LL | impl<X, Y: T3> T2 for GenericBurrito<X, Y> {}
306    |            --  ^^     ^^^^^^^^^^^^^^^^^^^^
307    |            |
308    |            unsatisfied trait bound introduced here
309 note: required for `Wrapper<GenericBurrito<Q, Q>>` to implement `T1`
310   --> $DIR/blame-trait-error-spans-on-exprs.rs:16:13
311    |
312 LL | impl<B: T2> T1 for Wrapper<B> {}
313    |         --  ^^     ^^^^^^^^^^
314    |         |
315    |         unsatisfied trait bound introduced here
316 note: required by a bound in `want`
317   --> $DIR/blame-trait-error-spans-on-exprs.rs:53:12
318    |
319 LL | fn want<V: T1>(_x: V) {}
320    |            ^^ required by this bound in `want`
321 help: consider restricting type parameter `Q`
322    |
323 LL | fn example<Q: T3>(q: Q) {
324    |             ++++
325
326 error[E0277]: the trait bound `Q: T1` is not satisfied
327   --> $DIR/blame-trait-error-spans-on-exprs.rs:120:35
328    |
329 LL |     want(Two { a: Two { a: (), b: q }, b: () });
330    |     ----                          ^ the trait `T1` is not implemented for `Q`
331    |     |
332    |     required by a bound introduced by this call
333    |
334 note: required for `Two<Two<(), Q>, ()>` to implement `T1`
335   --> $DIR/blame-trait-error-spans-on-exprs.rs:66:19
336    |
337 LL | impl<X, Y: T1, Z> T1 for Two<Two<X, Y>, Z> {}
338    |            --     ^^     ^^^^^^^^^^^^^^^^^
339    |            |
340    |            unsatisfied trait bound introduced here
341 note: required by a bound in `want`
342   --> $DIR/blame-trait-error-spans-on-exprs.rs:53:12
343    |
344 LL | fn want<V: T1>(_x: V) {}
345    |            ^^ required by this bound in `want`
346 help: consider restricting type parameter `Q`
347    |
348 LL | fn example<Q: T1>(q: Q) {
349    |             ++++
350
351 error[E0277]: the trait bound `Q: T1` is not satisfied
352   --> $DIR/blame-trait-error-spans-on-exprs.rs:126:59
353    |
354 LL |     want(
355    |     ---- required by a bound introduced by this call
356 LL |         Two { a: Two { a: (), b: Two { a: Two { a: (), b: q }, b: () } }, b: () },
357    |                                                           ^ the trait `T1` is not implemented for `Q`
358    |
359 note: required for `Two<Two<(), Q>, ()>` to implement `T1`
360   --> $DIR/blame-trait-error-spans-on-exprs.rs:66:19
361    |
362 LL | impl<X, Y: T1, Z> T1 for Two<Two<X, Y>, Z> {}
363    |            --     ^^     ^^^^^^^^^^^^^^^^^
364    |            |
365    |            unsatisfied trait bound introduced here
366    = note: 1 redundant requirement hidden
367    = note: required for `Two<Two<(), Two<Two<(), Q>, ()>>, ()>` to implement `T1`
368 note: required by a bound in `want`
369   --> $DIR/blame-trait-error-spans-on-exprs.rs:53:12
370    |
371 LL | fn want<V: T1>(_x: V) {}
372    |            ^^ required by this bound in `want`
373 help: consider restricting type parameter `Q`
374    |
375 LL | fn example<Q: T1>(q: Q) {
376    |             ++++
377
378 error: aborting due to 13 previous errors
379
380 For more information about this error, try `rustc --explain E0277`.