Skip to content

Commit a11fe5d

Browse files
committed
Add diagnostic items for pub mod consts of FP types
They will be used in Clippy.
1 parent 3d8c1c1 commit a11fe5d

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
@@ -980,10 +980,12 @@ symbols! {
980980
external_doc,
981981
f,
982982
f16,
983+
f16_consts_mod,
983984
f16_epsilon,
984985
f16_nan,
985986
f16c_target_feature,
986987
f32,
988+
f32_consts_mod,
987989
f32_epsilon,
988990
f32_legacy_const_digits,
989991
f32_legacy_const_epsilon,
@@ -1001,6 +1003,7 @@ symbols! {
10011003
f32_legacy_const_radix,
10021004
f32_nan,
10031005
f64,
1006+
f64_consts_mod,
10041007
f64_epsilon,
10051008
f64_legacy_const_digits,
10061009
f64_legacy_const_epsilon,
@@ -1018,6 +1021,7 @@ symbols! {
10181021
f64_legacy_const_radix,
10191022
f64_nan,
10201023
f128,
1024+
f128_consts_mod,
10211025
f128_epsilon,
10221026
f128_nan,
10231027
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)