-
Notifications
You must be signed in to change notification settings - Fork 13.3k
add next_index to Enumerate #139533
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
add next_index to Enumerate #139533
Conversation
rustbot has assigned @Mark-Simulacrum. Use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now, I just renamed the feature name in the unstable attribute to next_index, as well, so it matches the new name of the function. Is that okay? And can I just do that and use any string, or is there a sealed list of features defined somewhere where I also need to change the name?
Renaming the feature (especially given we've not landed anything yet) seems fine.
@Mark-Simulacrum I ended up adding a Doctest for the usual functionality of the feature, and a test in coretests to make sure it works correct for empty iterators. |
@bors r+ |
…enton Rollup of 7 pull requests Successful merges: - rust-lang#139042 (Do not remove trivial `SwitchInt` in analysis MIR) - rust-lang#139533 (add next_index to Enumerate) - rust-lang#139843 (Setup editor file associations for non-rs extensions) - rust-lang#140000 (skip llvm-config in autodiff check builds, when its unavailable) - rust-lang#140008 (Improve `clean_maybe_renamed_item` function code a bit) - rust-lang#140024 (Remove early exits from JumpThreading.) - rust-lang#140039 (Add option for stable backport poll) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#139533 - jogru0:130711, r=Mark-Simulacrum add next_index to Enumerate Proposal: rust-lang/libs-team#435 Tracking Issue: rust-lang#130711 This basically just reopens rust-lang#130682 but squashed and with the new function and the feature gate renamed to `next_index.` There are two questions I have already: - Shouldn't we add test coverage for that? I'm happy to provide some, but I might need a pointer to where these test would be. - Maybe I could actually also add a doctest? - For now, I just renamed the feature name in the unstable attribute to `next_index`, as well, so it matches the new name of the function. Is that okay? And can I just do that and use any string, or is there a sealed list of features defined somewhere where I also need to change the name?
add next_index to Enumerate Proposal: rust-lang/libs-team#435 Tracking Issue: rust-lang#130711 This basically just reopens rust-lang#130682 but squashed and with the new function and the feature gate renamed to `next_index.` There are two questions I have already: - Shouldn't we add test coverage for that? I'm happy to provide some, but I might need a pointer to where these test would be. - Maybe I could actually also add a doctest? - For now, I just renamed the feature name in the unstable attribute to `next_index`, as well, so it matches the new name of the function. Is that okay? And can I just do that and use any string, or is there a sealed list of features defined somewhere where I also need to change the name?
Proposal: rust-lang/libs-team#435
Tracking Issue: #130711
This basically just reopens #130682 but squashed and with the new function and the feature gate renamed to
next_index.
There are two questions I have already:
next_index
, as well, so it matches the new name of the function. Is that okay? And can I just do that and use any string, or is there a sealed list of features defined somewhere where I also need to change the name?