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.
Ping @alexcrichton (or whomever) to add the appropriate labels to this.
https://github.com/rust-lang/rust/issues/54054 tracks adding more impls of nth_back, but I think this doesn鈥檛 need to block stabilization.
@rfcbot fcp merge
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.
:bell: This is now entering its final comment period, as per the review above. :bell:
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.
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) -> Option
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 https://github.com/rust-lang/rust/issues/56995
error[E0658]: use of unstable library feature 'iter_nth_back'
Are you using an up to date nightly?
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?
Most helpful comment
:bell: This is now entering its final comment period, as per the review above. :bell: