You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// example trait to reproducepubtraitMap{fnmap(&self,x:u32,y:u32) -> Self;}implMapforu32{fnmap(&self,x:u32,_y:u32) -> Self{
x
}}fnmain(){one_into_iter([1]);two_iterators([1].iter(),[1.].iter());two_into_iters([1],[1.]);}fnone_into_iter(_a:implIntoIterator<Item = u32>) -> u32{0.map(1,2)// resolves correctly with one IntoIterator...}fntwo_iterators<A:Iterator<Item = u32>,B:Iterator<Item = f64>>(_a:A,_b:B) -> u32{0.map(1,2)// resolves correctly with two Iterators...}fntwo_into_iters<A:IntoIterator<Item = u32>,B:IntoIterator<Item = f64>>(_a:A,_b:B) -> u32{0.map(1,2)// with two IntoIterators, doesn't resolve to correct method -- errors...// (expected 1 argument, found 2) -- resolving it as Iterator::map, not Map::map}
This only happens if there are two type parameters which are both IntoIterator as far as I've seen, having one IntoIterator or 2+ type parameters of other types both work fine, it's just IntoIterator
The text was updated successfully, but these errors were encountered:
rust-analyzer version: 0.3.1885-standalone (b6d1887 2024-03-17)
rustc version: rustc 1.76.0 (07dca489a 2024-02-04)
relevant settings: n/a
repository link (if public, optional): n/a
code snippet to reproduce:
This only happens if there are two type parameters which are both IntoIterator as far as I've seen, having one IntoIterator or 2+ type parameters of other types both work fine, it's just IntoIterator
The text was updated successfully, but these errors were encountered: