1
1
error[E0277]: the trait bound `Q: T3` is not satisfied
2
- --> $DIR/blame-trait-error.rs:24 :46
2
+ --> $DIR/blame-trait-error.rs:28 :46
3
3
|
4
4
LL | want(Wrapper { value: Burrito { filling: q } });
5
5
| ---- ^ the trait `T3` is not implemented for `Q`
@@ -21,7 +21,7 @@ LL | impl<B: T2> T1 for Wrapper<B> {}
21
21
| |
22
22
| unsatisfied trait bound introduced here
23
23
note: required by a bound in `want`
24
- --> $DIR/blame-trait-error.rs:21 :12
24
+ --> $DIR/blame-trait-error.rs:25 :12
25
25
|
26
26
LL | fn want<V: T1>(_x: V) {}
27
27
| ^^ required by this bound in `want`
@@ -30,6 +30,81 @@ help: consider restricting type parameter `Q`
30
30
LL | fn example<Q: T3>(q: Q) {
31
31
| ++++
32
32
33
- error: aborting due to previous error
33
+ error[E0277]: `()` is not an iterator
34
+ --> $DIR/blame-trait-error.rs:31:15
35
+ |
36
+ LL | want(Some(()));
37
+ | ---- ^^ `()` is not an iterator
38
+ | |
39
+ | required by a bound introduced by this call
40
+ |
41
+ = help: the trait `Iterator` is not implemented for `()`
42
+ = help: the trait `T1` is implemented for `Option<It>`
43
+ note: required for `Option<()>` to implement `T1`
44
+ --> $DIR/blame-trait-error.rs:21:20
45
+ |
46
+ LL | impl<It: Iterator> T1 for Option<It> {}
47
+ | -------- ^^ ^^^^^^^^^^
48
+ | |
49
+ | unsatisfied trait bound introduced here
50
+ note: required by a bound in `want`
51
+ --> $DIR/blame-trait-error.rs:25:12
52
+ |
53
+ LL | fn want<V: T1>(_x: V) {}
54
+ | ^^ required by this bound in `want`
55
+
56
+ error[E0277]: `Q` is not an iterator
57
+ --> $DIR/blame-trait-error.rs:34:15
58
+ |
59
+ LL | want(Some(q));
60
+ | ---- ^ `Q` is not an iterator
61
+ | |
62
+ | required by a bound introduced by this call
63
+ |
64
+ note: required for `Option<Q>` to implement `T1`
65
+ --> $DIR/blame-trait-error.rs:21:20
66
+ |
67
+ LL | impl<It: Iterator> T1 for Option<It> {}
68
+ | -------- ^^ ^^^^^^^^^^
69
+ | |
70
+ | unsatisfied trait bound introduced here
71
+ note: required by a bound in `want`
72
+ --> $DIR/blame-trait-error.rs:25:12
73
+ |
74
+ LL | fn want<V: T1>(_x: V) {}
75
+ | ^^ required by this bound in `want`
76
+ help: consider restricting type parameter `Q`
77
+ |
78
+ LL | fn example<Q: std::iter::Iterator>(q: Q) {
79
+ | +++++++++++++++++++++
80
+
81
+ error[E0277]: `Q` is not an iterator
82
+ --> $DIR/blame-trait-error.rs:37:16
83
+ |
84
+ LL | want(&Some(q));
85
+ | ---- ^ `Q` is not an iterator
86
+ | |
87
+ | required by a bound introduced by this call
88
+ |
89
+ note: required for `Option<Q>` to implement `T1`
90
+ --> $DIR/blame-trait-error.rs:21:20
91
+ |
92
+ LL | impl<It: Iterator> T1 for Option<It> {}
93
+ | -------- ^^ ^^^^^^^^^^
94
+ | |
95
+ | unsatisfied trait bound introduced here
96
+ = note: 1 redundant requirement hidden
97
+ = note: required for `&Option<Q>` to implement `T1`
98
+ note: required by a bound in `want`
99
+ --> $DIR/blame-trait-error.rs:25:12
100
+ |
101
+ LL | fn want<V: T1>(_x: V) {}
102
+ | ^^ required by this bound in `want`
103
+ help: consider restricting type parameter `Q`
104
+ |
105
+ LL | fn example<Q: std::iter::Iterator>(q: Q) {
106
+ | +++++++++++++++++++++
107
+
108
+ error: aborting due to 4 previous errors
34
109
35
110
For more information about this error, try `rustc --explain E0277`.
0 commit comments