]>
Commit | Line | Data |
---|---|---|
1b1a35ee | 1 | error[E0271]: type mismatch resolving `<Adapter<I> as Iterator>::Item == Option<T>` |
0731742a | 2 | --> $DIR/associated-types-issue-20346.rs:34:5 |
b7449926 | 3 | | |
e1599b0c | 4 | LL | fn is_iterator_of<A, I: Iterator<Item=A>>(_: &I) {} |
ba9703b0 | 5 | | ------ required by this bound in `is_iterator_of` |
e1599b0c | 6 | ... |
60c5eb7d XL |
7 | LL | fn test_adapter<T, I: Iterator<Item=Option<T>>>(it: I) { |
8 | | - this type parameter | |
9 | ... | |
532ac7d7 | 10 | LL | is_iterator_of::<Option<T>, _>(&adapter); |
1b1a35ee | 11 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `Option`, found type parameter `T` |
b7449926 | 12 | | |
1b1a35ee | 13 | = note: expected enum `Option<T>` |
e74abb32 | 14 | found type `T` |
b7449926 XL |
15 | |
16 | error: aborting due to previous error | |
17 | ||
18 | For more information about this error, try `rustc --explain E0271`. |