| error[E0271]: type mismatch resolving `<Adapter<I> as Iterator>::Item == std::option::Option<T>` |
| --> $DIR/associated-types-issue-20346.rs:44:5 |
| | |
| LL | is_iterator_of::<Option<T>, _>(&adapter); //~ ERROR type mismatch |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected type parameter, found enum `std::option::Option` |
| | |
| = note: expected type `T` |
| found type `std::option::Option<T>` |
| note: required by `is_iterator_of` |
| --> $DIR/associated-types-issue-20346.rs:25:1 |
| | |
| LL | fn is_iterator_of<A, I: Iterator<Item=A>>(_: &I) {} |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| |
| error: aborting due to previous error |
| |
| For more information about this error, try `rustc --explain E0271`. |