feat(core): impl Step for NonZero<u*>#127534
Conversation
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @cuviper (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
This comment has been minimized.
This comment has been minimized.
|
UI tests are failing because the output of diagnostics was reorganized now that Its getting late so I'll take a look at it tomorrow and see if I find a way to update the ui tests. |
|
You can use I know you already went through an ACP, but I think this still needs a libs-api reviewer since it is instantly stable -- @rustbot label -T-libs +T-libs-api |
the8472
left a comment
There was a problem hiding this comment.
Regarding the stable API surface: We should also add the appropriate ExactSizeIterator impls, without repeating the 16-bit-platform mistakes.
|
|
718b7a9 to
ca46c6d
Compare
I see that |
ca46c6d to
18adf5f
Compare
|
@joshtriplett friendly ping. Should I assign someone else if you are too busy? |
|
r? libs-api |
|
@rfcbot fcp merge |
|
Team member @Amanieu 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. |
|
🔔 This is now entering its final comment period, as per the review above. 🔔 |
|
@rustbot label +I-libs-api-nominated FCP completed for this change (#127534 (comment)) but that was about a year ago. I don't expect that anything changed, but re-nominating since it's been a while just to be sure. |
|
LGTM from the libs-api side. |
|
From my understanding this is ready to be merged. Quick little bump :-) |
|
This still needs the squash I mentioned above, @jalil-salame could you do that? |
5829e77 to
c68381a
Compare
This comment has been minimized.
This comment has been minimized.
Implement Step for NonZero unsigned integers as discussed in [libs-team#130][1]. [1]: rust-lang/libs-team#130 `step_nonzero_impls` was adapted from `step_integer_impls` and the tests were adapted from the step tests. Signed-off-by: Jalil David Salamé Messina <jalil.salame@gmail.com>
c68381a to
d6b2806
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
@bors r=programmerjake,tgross35 |
…programmerjake,tgross35 feat(core): impl Step for NonZero<u*> Implement Step for NonZero unsigned integers as discussed in [libs-team#130][1]. [1]: rust-lang/libs-team#130 `step_nonzero_impls` was adapted from `step_integer_impls` and the tests were adapted from the step tests. It seems to compile and pass the tests c: I would like to test the edge cases, specially around overflows. To ensure safe code cannot generate a 0 `NonZero`, but I don't know how to go about it. I would love some feedback on that (and the PR overall). The impls are tagges with `#[unstable(feature = "step_trait", reason = "recently redesigned", issue = "42168")]`. I assumed this was appropriate, but I am not sure.
Rollup of 10 pull requests Successful merges: - #154376 (Remove more BuiltinLintDiag variants - part 4) - #127534 (feat(core): impl Step for NonZero<u*>) - #153286 (various fixes for scalable vectors) - #153592 (Add `min_adt_const_params` gate) - #154675 (Improve shadowed private field diagnostics) - #154703 (Fix trailing comma in lifetime suggestion for empty angle brackets) - #154653 (Remove rustc_on_unimplemented's append_const_msg) - #154743 (Remove an unused `StableHash` impl.) - #154752 (Add comment to borrow-checker) - #154764 (Add tests for three ICEs that have already been fixed)
Rollup of 5 pull requests Successful merges: - #154376 (Remove more BuiltinLintDiag variants - part 4) - #154731 (llvm: Fix array ABI test to not check equality implementation) - #127534 (feat(core): impl Step for NonZero<u*>) - #154703 (Fix trailing comma in lifetime suggestion for empty angle brackets) - #154776 (Fix ICE in read_discriminant for enums with non-contiguous discriminants)
Rollup merge of #127534 - jalil-salame:nonzero-uint-step, r=programmerjake,tgross35 feat(core): impl Step for NonZero<u*> Implement Step for NonZero unsigned integers as discussed in [libs-team#130][1]. [1]: rust-lang/libs-team#130 `step_nonzero_impls` was adapted from `step_integer_impls` and the tests were adapted from the step tests. It seems to compile and pass the tests c: I would like to test the edge cases, specially around overflows. To ensure safe code cannot generate a 0 `NonZero`, but I don't know how to go about it. I would love some feedback on that (and the PR overall). The impls are tagges with `#[unstable(feature = "step_trait", reason = "recently redesigned", issue = "42168")]`. I assumed this was appropriate, but I am not sure.
View all comments
Implement Step for NonZero unsigned integers as discussed in libs-team#130.
step_nonzero_implswas adapted fromstep_integer_implsand the tests were adapted from the step tests.It seems to compile and pass the tests c:
I would like to test the edge cases, specially around overflows. To ensure safe code cannot generate a 0
NonZero, but I don't know how to go about it. I would love some feedback on that (and the PR overall).The impls are tagges with
#[unstable(feature = "step_trait", reason = "recently redesigned", issue = "42168")]. I assumed this was appropriate, but I am not sure.