-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Make the getter for NonZero types into a const fn #56739
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @kennytm (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Previous attempt: #54799 The other PR also has a bunch of tests and related changes. If you have some spare time, it would be great if you could just rebase that PR and carry it over the finish line. |
Wasn't aware of the other PR. I'll attempt that as soon as I can find the time. |
r? @oli-obk |
Near as I can tell, several of the changes involved adding a special feature
which we don't need to bother with now that the minimal |
We still need to do that. Just like any other feature, we first implement it behind a feature gate, and then, once it has been tested on nightly, we stabilize the feature. |
I added the test and gate and such for NonZero types, but I didn't touch DebruijnIndex or any other thing at all. I don't have any understanding of those other parts and I don't want to get lots in the weeds. I'm focusing on a small PR that's a clear improvement, and other things can come later. |
This comment has been minimized.
This comment has been minimized.
I think we can dispense with that since we have min_const_fn on stable now; imo someone from T-libs can just FCP instead. cc @SimonSapin |
I’m in favor of making this constness stable immediately. @rfcbot fcp merge |
Should I do one more commit to remove the |
Team member @SimonSapin has proposed to merge this. The next step is review by the rest of the tagged teams: No concerns currently listed. Once a majority of reviewers approve (and none object), 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. |
It's not 100% clear to me if checking a box to stabilize this as |
As implemented in the PR, if the constness is unstable why did |
This is just a leftover from minimizing #54799, which actually used the function in a const way. I did not comment on that, because it was going to go away anyway if we choose to directly stabilize. |
In #56739 (comment) I proposed FCP to stabilize as |
☔ The latest upstream changes (presumably #56303) made this pull request unmergeable. Please resolve the merge conflicts. |
The merge conflict is simple to fix but we're waiting on 1 more vote before deciding on instant stable or nightly with feature. I don't want to clutter up the commit list, so I'll wait for that vote and decision. But thanks bors-bot. |
Ping from not-triage: can @Kimundi, @sfackler or @withoutboats review this? We just need one more tick for a majority. |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
@SimonSapin so it seems like we're going for the instant-stable option, correct? |
yes, feel free to proactively update the PR if you want |
@oli-obk all set. |
☔ The latest upstream changes (presumably #57133) made this pull request unmergeable. Please resolve the merge conflicts. |
@SimonSapin why would you do this to me on the day that my ISP stuffers a national outage! :P I will rebase when I can. |
@Lokathor did the rebase go wrong? |
It said there was nothing to rebase? Maybe I typed in the git command wrong. The "resolve conflicts" tool seems to have sorted it out though. |
@Lokathor You have a merge-commit tho and we prefer not to have those... ;) |
Ehh sorry? I can take care of rebasing for you if you’d like. Let me know, and make sure you check the checkbox https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/#enabling-repository-maintainer-permissions-on-existing-pull-requests |
Reworked this in #57167 |
I opened an issue for this here earlier today and no one immediately called it foolish, so here's the PR for it.