Skip to content

Commit 5c775a3

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 928c55a + 79612a1 commit 5c775a3

File tree

4 files changed

+4
-0
lines changed

4 files changed

+4
-0
lines changed

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

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

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

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)