Skip to content

Commit

Permalink
[Clippy] Swap float_equality_without_abs to use diagnostic items in…
Browse files Browse the repository at this point in the history
…stead of paths
  • Loading branch information
GnomedDev committed Sep 19, 2024
1 parent 6ef72c4 commit 3310a0b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions core/src/num/f32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ impl f32 {
/// [Machine epsilon]: https://en.wikipedia.org/wiki/Machine_epsilon
/// [`MANTISSA_DIGITS`]: f32::MANTISSA_DIGITS
#[stable(feature = "assoc_int_consts", since = "1.43.0")]
#[cfg_attr(not(test), rustc_diagnostic_item = "f32_epsilon")]
pub const EPSILON: f32 = 1.19209290e-07_f32;

/// Smallest finite `f32` value.
Expand Down
1 change: 1 addition & 0 deletions core/src/num/f64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ impl f64 {
/// [Machine epsilon]: https://en.wikipedia.org/wiki/Machine_epsilon
/// [`MANTISSA_DIGITS`]: f64::MANTISSA_DIGITS
#[stable(feature = "assoc_int_consts", since = "1.43.0")]
#[cfg_attr(not(test), rustc_diagnostic_item = "f64_epsilon")]
pub const EPSILON: f64 = 2.2204460492503131e-16_f64;

/// Smallest finite `f64` value.
Expand Down

0 comments on commit 3310a0b

Please sign in to comment.