-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Iterator reform broke reimplementations of methods now in IteratorExt #19435
Comments
This problem is also in the stdlib. Using |
The ability to override these was never an intended feature. It was a consequence of the implementation avoiding an extension trait. It doesn't make sense to do an ad-hoc override of a method like |
The sane way to do it is providing reusable methods on the base iterator trait that can be used to build features like |
So how come This means that I would have to implement a non-standard iterator at that place, loosing convenient access to The underlying problem is that I cannot provide a more specific implementation taking priority over the implementation for |
Recently,
Iterator
was split intoIterator
andIteratorExt
, with an implementationimpl<A, I: Iterator<A>> IteratorExt<A> for I
.I have an Iterator that implements
last
(as the underlying C-API has an efficient implementation for seeking), which now broke:The error is expected, but I'd expect that
IteratorExt
methods can be reimplemented like all others.The text was updated successfully, but these errors were encountered: