Skip to content
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

Tracking issue for DoubleEndedIterator::nth_back #56995

Closed
clarfonthey opened this issue Dec 19, 2018 · 8 comments · Fixed by #61363
Closed

Tracking issue for DoubleEndedIterator::nth_back #56995

clarfonthey opened this issue Dec 19, 2018 · 8 comments · Fixed by #61363
Labels
B-unstable Blocker: Implemented in the nightly compiler and unstable. C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@clarfonthey
Copy link
Contributor

PR: #56802

Currently, none of the standard adapters specialise this except for Rev, which trivially swaps nth and nth_back. These should probably be added before this feature is stabilised, and it's probably a good idea to check if nth should be specialised for any of these adapters too.

Additionally, the standard collection iterators should specialise this where appropriate.

@clarfonthey
Copy link
Contributor Author

Ping @alexcrichton (or whomever) to add the appropriate labels to this.

@alexcrichton alexcrichton added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. B-unstable Blocker: Implemented in the nightly compiler and unstable. C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. labels Dec 19, 2018
kennytm added a commit to kennytm/rust that referenced this issue Mar 24, 2019
Implement specialized nth_back() for Box and Windows.

Hi there, this is my first pull request to rust :-)

I started implementing some specializations for DoubleEndedIterator::nth_back() and these are the first two. The problem has been discussed in rust-lang#54054 and nth_back() is tracked in rust-lang#56995.

I'm stuck with the next implementation so I though I do a PR for the ones I'm confident with to get some feedback.
@SimonSapin
Copy link
Contributor

#54054 tracks adding more impls of nth_back, but I think this doesn’t need to block stabilization.

@rfcbot fcp merge

@rfcbot
Copy link

rfcbot commented Apr 24, 2019

Team member @SimonSapin has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Apr 24, 2019
@rfcbot
Copy link

rfcbot commented Apr 30, 2019

🔔 This is now entering its final comment period, as per the review above. 🔔

@rfcbot rfcbot added final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels Apr 30, 2019
@rfcbot rfcbot added the finished-final-comment-period The final comment period is finished for this PR / Issue. label May 10, 2019
@rfcbot
Copy link

rfcbot commented May 10, 2019

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

The RFC will be merged soon.

@rfcbot rfcbot removed the final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. label May 10, 2019
Centril added a commit to Centril/rust that referenced this issue May 30, 2019
pietroalbini added a commit to pietroalbini/rust that referenced this issue May 31, 2019
@sallyyu0
Copy link

Hello, I'm getting this error suddenly which points to this issue. Any clue how to fix it? Thanks!

Compiling lock_api v0.3.1
error[E0658]: use of unstable library feature 'iter_nth_back'
--> /home/zzz/.cargo/registry/src/github.com-1ecc6299db9ec823/ipnet-2.1.0/src/ipext.rs:638:5
|
638 | / fn nth_back(&mut self, n: usize) -> OptionSelf::Item {
639 | | match *self {
640 | | IpAddrRange::V4(ref mut a) => a.nth_back(n).map(IpAddr::V4),
641 | | IpAddrRange::V6(ref mut a) => a.nth_back(n).map(IpAddr::V6),
642 | | }
643 | | }
| |_____^
|
= note: for more information, see #56995

error[E0658]: use of unstable library feature 'iter_nth_back'

@clarfonthey
Copy link
Contributor Author

Are you using an up to date nightly?

@koalatux
Copy link
Contributor

error[E0658]: use of unstable library feature 'iter_nth_back'

nth_back() has been stabilized in Rust 1.37.0, have you tried updating to a recent version of Rust?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-unstable Blocker: Implemented in the nightly compiler and unstable. C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants