Add diagnostic items for f32::NAN
and f64::NAN
This commit is contained in:
parent
d7ad9d9797
commit
3681285df7
@ -701,7 +701,9 @@ symbols! {
|
||||
f,
|
||||
f16c_target_feature,
|
||||
f32,
|
||||
f32_nan,
|
||||
f64,
|
||||
f64_nan,
|
||||
fabsf32,
|
||||
fabsf64,
|
||||
fadd_fast,
|
||||
|
@ -403,6 +403,7 @@ impl f32 {
|
||||
/// and the stability of its representation over Rust versions
|
||||
/// and target platforms isn't guaranteed.
|
||||
#[stable(feature = "assoc_int_consts", since = "1.43.0")]
|
||||
#[rustc_diagnostic_item = "f32_nan"]
|
||||
pub const NAN: f32 = 0.0_f32 / 0.0_f32;
|
||||
/// Infinity (∞).
|
||||
#[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,
|
||||
/// and the stability of its representation over Rust versions
|
||||
/// and target platforms isn't guaranteed.
|
||||
#[rustc_diagnostic_item = "f64_nan"]
|
||||
#[stable(feature = "assoc_int_consts", since = "1.43.0")]
|
||||
pub const NAN: f64 = 0.0_f64 / 0.0_f64;
|
||||
/// Infinity (∞).
|
||||
|
Loading…
x
Reference in New Issue
Block a user