Closed
Description
fn next<T: Iterator<Item = U>, U>(t: &mut T) -> Option<U> {
t.next()
}
fn foo<T: Iterator>(t: &mut T) {
let _: Option<T::Item> = next(t);
}
In foo
, the bound T::Item normalizes-to T::Item
holds in the old solver in order for us to infer U = T::Item
in the call to next
.
This issue has been fixed by splitting Projection
and NormalizesTo
goals. Projection
goals get proven by simply equating the alias and the term while NormalizesTo
actually requires normalization.
(originally compiler-errors/next-solver-hir-issues#1 (comment))