Tracking Issue for `float_nan_to`
Open
Nobody has claimed this yet.
C-tracking-issue
S-tracking-needs-to-bake
T-libs
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Feature gate: #![feature(float_nan_to)]
This is a tracking issue for a float function that replaces NaNs with a user-specified value or returns the original value unchanged if it's a number.
Public API
impl {f16, f32, f64, f128} {
pub const fn nan_to(self, replacement: float) -> float;
}
Steps / History
- ACP: https://github.com/rust-lang/libs-team/issues/787
- Implementation: https://github.com/rust-lang/rust/pull/161250
- Final comment period (FCP)^1
- Stabilization PR
Unresolved Questions
- Function name bikeshed: T-libs had consensus for
nan_tobut many in the ACP seemed unsatisfied with that name. One argument against thenoun_tonaming convention: https://github.com/rust-lang/libs-team/issues/787#issuecomment-4550039765, see the issue for further discussion.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the ACP in rust-lang/libs-team#787 and the implementation pull request linked in the issue, then read the stabilization process in the std-dev-guide. The remaining work is the final comment period, resolving the function-name discussion, and producing a stabilization PR; no implementation file or test is named.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100