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
#[test]fndouble_into_iter(){check_types(r#"//- /main.rs crate:main deps:coreuse core::iter::IntoIterator;fn intoiter_issue<A, B>(foo: A)where A: IntoIterator<Item = B>, B: IntoIterator<Item = usize>,{ for x in foo { // ^ B for m in x { // ^ usize } }}//- /core.rs crate:corepub mod iter { pub trait Iterator { type Item; } pub trait IntoIterator { type Item; type IntoIter: Iterator<Item = Self::Item>; // #[lang = "into_iter"] fn into_iter(self) -> Self::IntoIter; } // Uncomment this impl and type inference/test works/passes. impl<I: Iterator> IntoIterator for I { type Item = I::Item; type IntoIter = I; fn into_iter(self) -> I { self } }}"#,);}
rust-analyzer version: 0f8c96c (current master)
rustc version: rustc 1.60.0-nightly (a7e2e3396 2022-01-08)
Something weird is going on here because it works without the
impl<I: Iterator> Iterator for I
impl.The text was updated successfully, but these errors were encountered: