Add diagnostic items for f32::NAN
and f64::NAN
This commit is contained in:
parent
d7ad9d9797
commit
3681285df7
3 changed files with 4 additions and 0 deletions
|
@ -701,7 +701,9 @@ symbols! {
|
||||||
f,
|
f,
|
||||||
f16c_target_feature,
|
f16c_target_feature,
|
||||||
f32,
|
f32,
|
||||||
|
f32_nan,
|
||||||
f64,
|
f64,
|
||||||
|
f64_nan,
|
||||||
fabsf32,
|
fabsf32,
|
||||||
fabsf64,
|
fabsf64,
|
||||||
fadd_fast,
|
fadd_fast,
|
||||||
|
|
|
@ -403,6 +403,7 @@ impl f32 {
|
||||||
/// and the stability of its representation over Rust versions
|
/// and the stability of its representation over Rust versions
|
||||||
/// and target platforms isn't guaranteed.
|
/// and target platforms isn't guaranteed.
|
||||||
#[stable(feature = "assoc_int_consts", since = "1.43.0")]
|
#[stable(feature = "assoc_int_consts", since = "1.43.0")]
|
||||||
|
#[rustc_diagnostic_item = "f32_nan"]
|
||||||
pub const NAN: f32 = 0.0_f32 / 0.0_f32;
|
pub const NAN: f32 = 0.0_f32 / 0.0_f32;
|
||||||
/// Infinity (∞).
|
/// Infinity (∞).
|
||||||
#[stable(feature = "assoc_int_consts", since = "1.43.0")]
|
#[stable(feature = "assoc_int_consts", since = "1.43.0")]
|
||||||
|
|
|
@ -401,6 +401,7 @@ impl f64 {
|
||||||
/// This constant isn't guaranteed to equal to any specific NaN bitpattern,
|
/// This constant isn't guaranteed to equal to any specific NaN bitpattern,
|
||||||
/// and the stability of its representation over Rust versions
|
/// and the stability of its representation over Rust versions
|
||||||
/// and target platforms isn't guaranteed.
|
/// and target platforms isn't guaranteed.
|
||||||
|
#[rustc_diagnostic_item = "f64_nan"]
|
||||||
#[stable(feature = "assoc_int_consts", since = "1.43.0")]
|
#[stable(feature = "assoc_int_consts", since = "1.43.0")]
|
||||||
pub const NAN: f64 = 0.0_f64 / 0.0_f64;
|
pub const NAN: f64 = 0.0_f64 / 0.0_f64;
|
||||||
/// Infinity (∞).
|
/// Infinity (∞).
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue