-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Stabilize cmp_min_max_by #81047
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
Stabilize cmp_min_max_by #81047
Conversation
r? @shepmaster (rust-highfive has picked a reviewer for you, use r? to override) |
this is my first time doing a stabilization PR, so lmk if I did anything wrong here! #64460 (comment) seemed to indicate this was the proper next step. |
This comment has been minimized.
This comment has been minimized.
876f7ae
to
4d70d7c
Compare
This comment has been minimized.
This comment has been minimized.
4d70d7c
to
3f85151
Compare
@shepmaster this is waiting for your review :) thanks |
r? @KodrAus for T-libs FCP |
@rust-lang/libs Could someone kick off FCP? Thanks! |
@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. |
library/core/src/cmp.rs
Outdated
/// use std::cmp; | ||
/// | ||
/// assert_eq!(cmp::min_by(-2, 1, |x: &i32, y: &i32| x.abs().cmp(&y.abs())), 1); | ||
/// assert_eq!(cmp::min_by(-2, 2, |x: &i32, y: &i32| x.abs().cmp(&y.abs())), -2); | ||
/// ``` | ||
#[inline] | ||
#[must_use] | ||
#[unstable(feature = "cmp_min_max_by", issue = "64460")] | ||
#[stable(feature = "cmp_min_max_by", since = "1.50.0")] |
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.
#[stable(feature = "cmp_min_max_by", since = "1.50.0")] | |
#[stable(feature = "cmp_min_max_by", since = "1.53.0")] |
NOTE: This should be changed to 1.53.0
(i.e. the nightly version at that point) once FCP is done.
Why do the |
|
@dtolnay Derp, missed that. Thanks! |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
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. |
bumped version in the stable attribute to 1.52.0, which afaict is the next version - lmk if this wasn't the correct thing to do |
3f85151
to
2601fae
Compare
This comment has been minimized.
This comment has been minimized.
2601fae
to
14c7f2c
Compare
Actually the version number should be 1.53.0 which is the current master. 1.51.0 is the current stable and 1.52.0 is the current beta. |
I would like to propose cmp::{min_by, min_by_key, max_by, max_by_key} for stabilization. These are relatively simple and seemingly uncontroversial functions and have been unchanged in unstable for a while now.
14c7f2c
to
462f86d
Compare
done, thanks! |
@bors r=kodraus |
📌 Commit 462f86d has been approved by |
☀️ Test successful - checks-actions |
I would like to propose cmp::{min_by, min_by_key, max_by, max_by_key}
for stabilization.
These are relatively simple and seemingly uncontroversial functions and
have been unchanged in unstable for a while now.
Closes: #64460