Skip to content

Move {f32,f64}::clamp to core. - #79473

Merged
bors merged 1 commit into
rust-lang:masterfrom
m-ou-se:clamp-in-core
Dec 20, 2020
Merged

bors merged 1 commit into
rust-lang:masterfrom
m-ou-se:clamp-in-core

Conversation

@m-ou-se

@m-ou-se m-ou-se commented Nov 27, 2020 •

Copy link
Copy Markdown
Member

clamp was recently stabilized (tracking issue: #44095). But although Ord::clamp was added in core (because Ord is in core), the versions for the f32 and f64 primitives were added in std (together with floor, sin, etc.), not in core (together with min, max, from_bits, etc.).

This change moves them to core, such that clamp on floats is available in no_std programs as well.

@m-ou-se m-ou-se added A-floating-point Area: Floating point numbers and arithmetic T-libs-api [DEPRECATED; DO NOT USE] labels Nov 27, 2020
@m-ou-se

m-ou-se commented Nov 27, 2020

Copy link
Copy Markdown
Member Author

@rfcbot merge

@rfcbot

rfcbot commented Nov 27, 2020 •

Copy link
Copy Markdown

Team member @m-ou-se 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.

@rfcbot rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Nov 27, 2020
@rfcbot rfcbot added final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels Dec 9, 2020
@rfcbot

rfcbot commented Dec 9, 2020

Copy link
Copy Markdown

🔔 This is now entering its final comment period, as per the review above. 🔔

@rfcbot rfcbot added finished-final-comment-period The final comment period is finished for this PR / Issue. to-announce Announce this issue on triage meeting and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels Dec 19, 2020
@rfcbot

rfcbot commented Dec 19, 2020

Copy link
Copy Markdown

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.

@m-ou-se

m-ou-se commented Dec 19, 2020

Copy link
Copy Markdown
Member Author

@bors r+

@bors

bors commented Dec 19, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit 0523eeb has been approved by m-ou-se

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Dec 19, 2020
@bors

bors commented Dec 19, 2020

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 0523eeb with merge c1d5843...

@bors

bors commented Dec 20, 2020

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: m-ou-se
Pushing c1d5843 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 20, 2020
@bors
bors merged commit c1d5843 into rust-lang:master Dec 20, 2020
@rustbot rustbot added this to the 1.50.0 milestone Dec 20, 2020
@m-ou-se
m-ou-se deleted the clamp-in-core branch December 22, 2020 21:08
@spastorino spastorino removed the to-announce Announce this issue on triage meeting label Dec 31, 2020
@pthariensflame

Copy link
Copy Markdown
Contributor

Does this need relnotes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-floating-point Area: Floating point numbers and arithmetic disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs-api [DEPRECATED; DO NOT USE]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants