[Clippy] Swap float_equality_without_abs to use diagnostic items in… · qinheping/verify-rust-std@3310a0b (original) (raw)

2 files changed

lines changed

Original file line number Diff line number Diff line change
@@ -415,6 +415,7 @@ impl f32 {
415 415 /// [Machine epsilon]: https://en.wikipedia.org/wiki/Machine\_epsilon
416 416 /// [`MANTISSA_DIGITS`]: f32::MANTISSA_DIGITS
417 417 #[stable(feature = "assoc_int_consts", since = "1.43.0")]
418 +#[cfg_attr(not(test), rustc_diagnostic_item = "f32_epsilon")]
418 419 pub const EPSILON: f32 = 1.19209290e-07_f32;
419 420
420 421 /// Smallest finite `f32` value.
Original file line number Diff line number Diff line change
@@ -414,6 +414,7 @@ impl f64 {
414 414 /// [Machine epsilon]: https://en.wikipedia.org/wiki/Machine\_epsilon
415 415 /// [`MANTISSA_DIGITS`]: f64::MANTISSA_DIGITS
416 416 #[stable(feature = "assoc_int_consts", since = "1.43.0")]
417 +#[cfg_attr(not(test), rustc_diagnostic_item = "f64_epsilon")]
417 418 pub const EPSILON: f64 = 2.2204460492503131e-16_f64;
418 419
419 420 /// Smallest finite `f64` value.