diff options
| author | Jakub Beránek <berykubik@gmail.com> | 2025-06-02 15:19:19 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-02 15:19:19 +0200 |
| commit | b2743c7fb1fb4d93b74e8324ac055b98efd13da5 (patch) | |
| tree | b3ef33d4306fe189b601665d40bd26d186c24843 | |
| parent | f8e756b0eb5a6ed95d888e4c2429aae5eaca9126 (diff) | |
| parent | d948907f8093d7a9cb22c489e5d7afe6721730e2 (diff) | |
| download | rust-b2743c7fb1fb4d93b74e8324ac055b98efd13da5.tar.gz rust-b2743c7fb1fb4d93b74e8324ac055b98efd13da5.zip | |
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``
| -rw-r--r-- | compiler/rustc_span/src/symbol.rs | 2 | ||||
| -rw-r--r-- | library/core/src/num/f128.rs | 1 | ||||
| -rw-r--r-- | library/core/src/num/f16.rs | 1 |
3 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index 970faf2997c..4e842a8f93a 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -937,8 +937,10 @@ symbols! { external_doc, f, f128, + f128_epsilon, f128_nan, f16, + f16_epsilon, f16_nan, f16c_target_feature, f32, diff --git a/library/core/src/num/f128.rs b/library/core/src/num/f128.rs index 6b9b2ba8689..58de62a8be8 100644 --- a/library/core/src/num/f128.rs +++ b/library/core/src/num/f128.rs @@ -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. diff --git a/library/core/src/num/f16.rs b/library/core/src/num/f16.rs index eb7af993c60..45f402d4967 100644 --- a/library/core/src/num/f16.rs +++ b/library/core/src/num/f16.rs @@ -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. |
