Skip to content

Implement clamp_magnitude method for primitive floats & signed integers - #148690

Merged
bors merged 1 commit into
rust-lang:mainfrom
IntegralPilot:clamp-mag
Dec 1, 2025
Merged

Implement clamp_magnitude method for primitive floats & signed integers#148690
bors merged 1 commit into
rust-lang:mainfrom
IntegralPilot:clamp-mag

Conversation

@IntegralPilot

@IntegralPilotIntegralPilot commented Nov 8, 2025

Copy link
Copy Markdown
Contributor

Tracking issue #148519
ACP rust-lang/libs-team#686

@rustbotrustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Nov 8, 2025
@rust-log-analyzer

This comment has been minimized.

Comment threadsrc/doc/unstable-book/src/library-features/clamp-magnitude.md Outdated
Comment threadtests/ui/feature-gates/feature-gate-clamp_magnitude.rs Outdated
@IntegralPilot
IntegralPilot marked this pull request as ready for review November 8, 2025 12:37
@rustbotrustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 8, 2025
@rustbotrustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Nov 8, 2025
@rustbot

Copy link
Copy Markdown
Collaborator

r? @joboet

rustbot has assigned @joboet.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Comment threadcompiler/rustc_span/src/symbol.rs Outdated
@IntegralPilot

Copy link
Copy Markdown
ContributorAuthor

@rustbot label -T-compiler

@rustbotrustbot removed the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Nov 9, 2025
Comment threadlibrary/core/src/num/int_macros.rs Outdated
Comment threadlibrary/coretests/tests/num/clamp_magnitude.rs Outdated
Comment threadlibrary/coretests/tests/num/clamp_magnitude.rs
@rust-log-analyzer

This comment has been minimized.

@IntegralPilot

IntegralPilot commented Nov 29, 2025

Copy link
Copy Markdown
ContributorAuthor

Oh sorry, I'm currently without the ability to test a build locally for the moment so am using the CI to do so, I'll try and fix the issues the new commit introduced now.

@rust-log-analyzer

This comment has been minimized.

@joboet

Copy link
Copy Markdown
Member

Oh sorry, I'm currently without the ability to test a build locally for the moment so am using the CI to do so, I'll try and fix the issues the new commit introduced now.

No worries!

@joboetjoboet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! Please squash the commits into one, then I'll merge the PR.

View changes since this review

Added feature gate, documentation and tests also.
@IntegralPilot

Copy link
Copy Markdown
ContributorAuthor

Thanks so much for your review! I've squashed now.

@joboet

Copy link
Copy Markdown
Member

👍
@bors r+

@bors

bors commented Dec 1, 2025

Copy link
Copy Markdown
Collaborator

📌 Commit ae7fa32 has been approved by joboet

It is now in the queue for this repository.

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 1, 2025
bors added a commit that referenced this pull request Dec 1, 2025
Rollup of 9 pull requests
Successful merges:
- #148690 (Implement `clamp_magnitude` method for primitive floats & signed integers)
- #149102 (stabilize maybe_uninit_slice)
- #149269 (cmse: do not calculate the layout of a type with infer types)
- #149299 (Fudge infer vars in the cause code of `Obligation` intentionally)
- #149344 (Don't suggest unwrap for Result in const)
- #149358 (fix(parse): Limit frontmatter fences to 255 dashes )
- #149445 (make assoc fn inherit const stability from inherent `const impl` blocks)
- #149479 (Fix indent in E0591.md)
- #149496 (Fix#148889: Add label rib when visiting delegation body)
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit 9a967de into rust-lang:mainDec 1, 2025
11 checks passed
@rustbotrustbot added this to the 1.93.0 milestone Dec 1, 2025
rust-timer added a commit that referenced this pull request Dec 1, 2025
Rollup merge of #148690 - IntegralPilot:clamp-mag, r=joboet
Implement `clamp_magnitude` method for primitive floats & signed integers
Tracking issue #148519
ACP rust-lang/libs-team#686
@IntegralPilot
IntegralPilot deleted the clamp-mag branch December 1, 2025 21:34
github-actionsBot pushed a commit to rust-lang/rust-analyzer that referenced this pull request Dec 15, 2025
Rollup of 9 pull requests
Successful merges:
- rust-lang/rust#148690 (Implement `clamp_magnitude` method for primitive floats & signed integers)
- rust-lang/rust#149102 (stabilize maybe_uninit_slice)
- rust-lang/rust#149269 (cmse: do not calculate the layout of a type with infer types)
- rust-lang/rust#149299 (Fudge infer vars in the cause code of `Obligation` intentionally)
- rust-lang/rust#149344 (Don't suggest unwrap for Result in const)
- rust-lang/rust#149358 (fix(parse): Limit frontmatter fences to 255 dashes )
- rust-lang/rust#149445 (make assoc fn inherit const stability from inherent `const impl` blocks)
- rust-lang/rust#149479 (Fix indent in E0591.md)
- rust-lang/rust#149496 (Fixrust-lang/rust#148889: Add label rib when visiting delegation body)
r? `@ghost`
`@rustbot` modify labels: rollup
github-actionsBot pushed a commit to model-checking/verify-rust-std that referenced this pull request Jan 20, 2026
Implement `clamp_magnitude` method for primitive floats & signed integers
Tracking issue rust-lang#148519
ACP rust-lang/libs-team#686
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-libsRelevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@IntegralPilot@rust-log-analyzer@rustbot@joboet@bors@Urgau@Zalathar