rust-lang / rust-lang/rust

Tracking Issue for `float_nan_to`

Open
#161,248 3 comments 0 reactions 0 assignees View on GitHub

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
Unresolved Questions

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.