implement const Iterator for Range#156216
Conversation
|
Another issue I noticed is that |
This comment has been minimized.
This comment has been minimized.
|
Does this run into #148200 for types that implement non-const |
This comment has been minimized.
This comment has been minimized.
|
@theemathas |
|
Maybe there's actually not a problem with specialization here? I suppose it's kind of fine to call a function that requires |
| #[stable(feature = "rust1", since = "1.0.0")] | ||
| impl<A: Step> DoubleEndedIterator for ops::Range<A> { | ||
| #[rustc_const_unstable(feature = "const_iter", issue = "92476")] | ||
| impl<A: [const] Step + [const] Destruct> const DoubleEndedIterator for ops::Range<A> { |
There was a problem hiding this comment.
Is this change needed for the MVP? should at least be a separate commit unless the rest of this commit requires it
This allows the use of
for i in i..ninconst.This I believe is interesting enough to be justified under #155816
r? @oli-obk