Skip to content

Commit 811bee4

Browse files
authored
Rollup merge of rust-lang#147420 - samueltardieu:diag-items/consts-mod, r=joboet
Add diagnostic items for `pub mod consts` of FP types They will be used in Clippy.
2 parents 1e7fafb + a11fe5d commit 811bee4

File tree

5 files changed

+8
-0
lines changed

5 files changed

+8
-0
lines changed

compiler/rustc_span/src/symbol.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -981,10 +981,12 @@ symbols! {
981981
external_doc,
982982
f,
983983
f16,
984+
f16_consts_mod,
984985
f16_epsilon,
985986
f16_nan,
986987
f16c_target_feature,
987988
f32,
989+
f32_consts_mod,
988990
f32_epsilon,
989991
f32_legacy_const_digits,
990992
f32_legacy_const_epsilon,
@@ -1002,6 +1004,7 @@ symbols! {
10021004
f32_legacy_const_radix,
10031005
f32_nan,
10041006
f64,
1007+
f64_consts_mod,
10051008
f64_epsilon,
10061009
f64_legacy_const_digits,
10071010
f64_legacy_const_epsilon,
@@ -1019,6 +1022,7 @@ symbols! {
10191022
f64_legacy_const_radix,
10201023
f64_nan,
10211024
f128,
1025+
f128_consts_mod,
10221026
f128_epsilon,
10231027
f128_nan,
10241028
fabsf16,

library/core/src/num/f128.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ use crate::{intrinsics, mem};
1818

1919
/// Basic mathematical constants.
2020
#[unstable(feature = "f128", issue = "116909")]
21+
#[rustc_diagnostic_item = "f128_consts_mod"]
2122
pub mod consts {
2223
// FIXME: replace with mathematical constants from cmath.
2324

library/core/src/num/f16.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ use crate::{intrinsics, mem};
2020

2121
/// Basic mathematical constants.
2222
#[unstable(feature = "f16", issue = "116909")]
23+
#[rustc_diagnostic_item = "f16_consts_mod"]
2324
pub mod consts {
2425
// FIXME: replace with mathematical constants from cmath.
2526

library/core/src/num/f32.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ pub const NEG_INFINITY: f32 = f32::NEG_INFINITY;
277277

278278
/// Basic mathematical constants.
279279
#[stable(feature = "rust1", since = "1.0.0")]
280+
#[rustc_diagnostic_item = "f32_consts_mod"]
280281
pub mod consts {
281282
// FIXME: replace with mathematical constants from cmath.
282283

library/core/src/num/f64.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ pub const NEG_INFINITY: f64 = f64::NEG_INFINITY;
277277

278278
/// Basic mathematical constants.
279279
#[stable(feature = "rust1", since = "1.0.0")]
280+
#[rustc_diagnostic_item = "f64_consts_mod"]
280281
pub mod consts {
281282
// FIXME: replace with mathematical constants from cmath.
282283

0 commit comments

Comments
 (0)