]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/associated-types-issue-20346.stderr
Rollup merge of #98441 - calebzulawski:simd_as, r=oli-obk
[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:36
3    |
4 LL | fn test_adapter<T, I: Iterator<Item=Option<T>>>(it: I) {
5    |                 - this type parameter
6 ...
7 LL |     is_iterator_of::<Option<T>, _>(&adapter);
8    |     ------------------------------ ^^^^^^^^ type mismatch resolving `<Adapter<I> as Iterator>::Item == Option<T>`
9    |     |
10    |     required by a bound introduced by this call
11    |
12 note: expected this to be `Option<T>`
13   --> $DIR/associated-types-issue-20346.rs:23:17
14    |
15 LL |     type Item = T;
16    |                 ^
17    = note:        expected enum `Option<T>`
18            found type parameter `T`
19 note: required by a bound in `is_iterator_of`
20   --> $DIR/associated-types-issue-20346.rs:15:34
21    |
22 LL | fn is_iterator_of<A, I: Iterator<Item=A>>(_: &I) {}
23    |                                  ^^^^^^ required by this bound in `is_iterator_of`
24
25 error: aborting due to previous error
26
27 For more information about this error, try `rustc --explain E0271`.