Skip to content

ACP Experiment: Change core::range::RangeFromIter to be terminating - #165236

Draft
Erk- wants to merge 1 commit into
rust-lang:mainfrom
Erk-:experiment/terminating-rangefromiter
Draft

Erk- wants to merge 1 commit into
rust-lang:mainfrom
Erk-:experiment/terminating-rangefromiter

Conversation

@Erk-

@Erk- Erk- commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

This is a experiment in relation with ACP: Change overflow behaviour of the RangeFrom iterator rust-lang/libs-team#922

This changes the new_range_api std::range::RangeFromIter to be terminating. This is essentially the change I propose.

One thing I ran into is that this means that there is no good way of implementing the unstable remainder function return a range so I changed it to return a optional range, though that is something that can be discussed as well.

It is an open issue how other empty ranges should handle remainder as far as I understand.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Oct 31, 2026
@Erk- Erk- changed the title ACP Experiment: Change core::range::RangeFromIter to be terminating ACP Experiment: Change core::range::RangeFromIter to be terminating Oct 31, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants