rust-analyzer
rust-analyzer copied to clipboard
type inference breaks if there is more than one IntoIterator bound.
With this code, the B: IntoIterator<Item = Foo>,
bound added breaks inference on a
.
struct Foo {
bar: u64,
}
fn what<A, B>(a: A, b: B)
where
A: IntoIterator<Item = Foo>,
B: IntoIterator<Item = Foo>,
{
a.into_iter().map(|x| x.bar).count();
}
rust-analyzer version: dd43f3f2d 2021-10-27 nightly
Likely the same issue as #9990
https://github.com/rust-lang/chalk/issues/750 is the Chalk root cause. #11242 has a reproduction in a hir-ty test.