Rollup merge of #141874 - usamoi:eps, r=tgross35

add f16_epsilon and f128_epsilon diagnostic items

cc https://github.com/rust-lang/rust/issues/116909
r? ``@tgross35``
This commit is contained in:
Jakub Beránek
2025-06-02 15:19:19 +02:00
committed by GitHub
3 changed files with 4 additions and 0 deletions

View File

@@ -937,8 +937,10 @@ symbols! {
external_doc,
f,
f128,
f128_epsilon,
f128_nan,
f16,
f16_epsilon,
f16_nan,
f16c_target_feature,
f32,

View File

@@ -171,6 +171,7 @@ impl f128 {
/// [Machine epsilon]: https://en.wikipedia.org/wiki/Machine_epsilon
/// [`MANTISSA_DIGITS`]: f128::MANTISSA_DIGITS
#[unstable(feature = "f128", issue = "116909")]
#[rustc_diagnostic_item = "f128_epsilon"]
pub const EPSILON: f128 = 1.92592994438723585305597794258492732e-34_f128;
/// Smallest finite `f128` value.

View File

@@ -168,6 +168,7 @@ impl f16 {
/// [Machine epsilon]: https://en.wikipedia.org/wiki/Machine_epsilon
/// [`MANTISSA_DIGITS`]: f16::MANTISSA_DIGITS
#[unstable(feature = "f16", issue = "116909")]
#[rustc_diagnostic_item = "f16_epsilon"]
pub const EPSILON: f16 = 9.7656e-4_f16;
/// Smallest finite `f16` value.