Rust 1.100.1 Fixes Iterator Regression Rejecting Valid Implementations

A Rust 1.100.1 release note reports a regression where valid iterator implementations were no longer recognized after a change to the unstable const version of Iterator. The author describes a compiler error saying a type is not an iterator, even though its implementation already includes a bound on its dereference target. The bug surfaced when overridden nth and nth_back methods failed while next and next_back were accepted. The article uses a small wrapper type to show the associated-type projection, and notes that the author's local test ran on rustc 1.99.1 rather than the affected versions. The author advises checking the compiler version and dependencies before adding redundant bounds as a workaround.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in