]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/associated-types-issue-20346.stderr
feat(rustdoc): open sidebar menu when links inside it are focused
[rust.git] / src / test / ui / associated-types / associated-types-issue-20346.stderr
1 error[E0271]: type mismatch resolving `<Adapter<I> as Iterator>::Item == Option<T>`
2   --> $DIR/associated-types-issue-20346.rs:34:5
3    |
4 LL | fn is_iterator_of<A, I: Iterator<Item=A>>(_: &I) {}
5    |                                  ------ required by this bound in `is_iterator_of`
6 ...
7 LL | fn test_adapter<T, I: Iterator<Item=Option<T>>>(it: I) {
8    |                 - this type parameter
9 ...
10 LL |     is_iterator_of::<Option<T>, _>(&adapter);
11    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `Option`, found type parameter `T`
12    |
13    = note: expected enum `Option<T>`
14               found type `T`
15
16 error: aborting due to previous error
17
18 For more information about this error, try `rustc --explain E0271`.