@@ -32,6 +32,7 @@ use crate::num::FpCategory;
3232/// ```
3333#[ stable( feature = "rust1" , since = "1.0.0" ) ]
3434#[ deprecated( since = "TBD" , note = "replaced by the `RADIX` associated constant on `f32`" ) ]
35+ #[ rustc_diagnostic_item = "f32_legacy_const_radix" ]
3536pub const RADIX : u32 = f32:: RADIX ;
3637
3738/// Number of significant digits in base 2.
@@ -52,6 +53,7 @@ pub const RADIX: u32 = f32::RADIX;
5253 since = "TBD" ,
5354 note = "replaced by the `MANTISSA_DIGITS` associated constant on `f32`"
5455) ]
56+ #[ rustc_diagnostic_item = "f32_legacy_const_mantissa_dig" ]
5557pub const MANTISSA_DIGITS : u32 = f32:: MANTISSA_DIGITS ;
5658
5759/// Approximate number of significant digits in base 10.
@@ -69,6 +71,7 @@ pub const MANTISSA_DIGITS: u32 = f32::MANTISSA_DIGITS;
6971/// ```
7072#[ stable( feature = "rust1" , since = "1.0.0" ) ]
7173#[ deprecated( since = "TBD" , note = "replaced by the `DIGITS` associated constant on `f32`" ) ]
74+ #[ rustc_diagnostic_item = "f32_legacy_const_digits" ]
7275pub const DIGITS : u32 = f32:: DIGITS ;
7376
7477/// [Machine epsilon] value for `f32`.
@@ -90,6 +93,7 @@ pub const DIGITS: u32 = f32::DIGITS;
9093/// ```
9194#[ stable( feature = "rust1" , since = "1.0.0" ) ]
9295#[ deprecated( since = "TBD" , note = "replaced by the `EPSILON` associated constant on `f32`" ) ]
96+ #[ rustc_diagnostic_item = "f32_legacy_const_epsilon" ]
9397pub const EPSILON : f32 = f32:: EPSILON ;
9498
9599/// Smallest finite `f32` value.
@@ -107,6 +111,7 @@ pub const EPSILON: f32 = f32::EPSILON;
107111/// ```
108112#[ stable( feature = "rust1" , since = "1.0.0" ) ]
109113#[ deprecated( since = "TBD" , note = "replaced by the `MIN` associated constant on `f32`" ) ]
114+ #[ rustc_diagnostic_item = "f32_legacy_const_min" ]
110115pub const MIN : f32 = f32:: MIN ;
111116
112117/// Smallest positive normal `f32` value.
@@ -124,6 +129,7 @@ pub const MIN: f32 = f32::MIN;
124129/// ```
125130#[ stable( feature = "rust1" , since = "1.0.0" ) ]
126131#[ deprecated( since = "TBD" , note = "replaced by the `MIN_POSITIVE` associated constant on `f32`" ) ]
132+ #[ rustc_diagnostic_item = "f32_legacy_const_min_positive" ]
127133pub const MIN_POSITIVE : f32 = f32:: MIN_POSITIVE ;
128134
129135/// Largest finite `f32` value.
@@ -141,6 +147,7 @@ pub const MIN_POSITIVE: f32 = f32::MIN_POSITIVE;
141147/// ```
142148#[ stable( feature = "rust1" , since = "1.0.0" ) ]
143149#[ deprecated( since = "TBD" , note = "replaced by the `MAX` associated constant on `f32`" ) ]
150+ #[ rustc_diagnostic_item = "f32_legacy_const_max" ]
144151pub const MAX : f32 = f32:: MAX ;
145152
146153/// One greater than the minimum possible normal power of 2 exponent.
@@ -158,6 +165,7 @@ pub const MAX: f32 = f32::MAX;
158165/// ```
159166#[ stable( feature = "rust1" , since = "1.0.0" ) ]
160167#[ deprecated( since = "TBD" , note = "replaced by the `MIN_EXP` associated constant on `f32`" ) ]
168+ #[ rustc_diagnostic_item = "f32_legacy_const_min_exp" ]
161169pub const MIN_EXP : i32 = f32:: MIN_EXP ;
162170
163171/// Maximum possible power of 2 exponent.
@@ -175,6 +183,7 @@ pub const MIN_EXP: i32 = f32::MIN_EXP;
175183/// ```
176184#[ stable( feature = "rust1" , since = "1.0.0" ) ]
177185#[ deprecated( since = "TBD" , note = "replaced by the `MAX_EXP` associated constant on `f32`" ) ]
186+ #[ rustc_diagnostic_item = "f32_legacy_const_max_exp" ]
178187pub const MAX_EXP : i32 = f32:: MAX_EXP ;
179188
180189/// Minimum possible normal power of 10 exponent.
@@ -192,6 +201,7 @@ pub const MAX_EXP: i32 = f32::MAX_EXP;
192201/// ```
193202#[ stable( feature = "rust1" , since = "1.0.0" ) ]
194203#[ deprecated( since = "TBD" , note = "replaced by the `MIN_10_EXP` associated constant on `f32`" ) ]
204+ #[ rustc_diagnostic_item = "f32_legacy_const_min_10_exp" ]
195205pub const MIN_10_EXP : i32 = f32:: MIN_10_EXP ;
196206
197207/// Maximum possible power of 10 exponent.
@@ -209,6 +219,7 @@ pub const MIN_10_EXP: i32 = f32::MIN_10_EXP;
209219/// ```
210220#[ stable( feature = "rust1" , since = "1.0.0" ) ]
211221#[ deprecated( since = "TBD" , note = "replaced by the `MAX_10_EXP` associated constant on `f32`" ) ]
222+ #[ rustc_diagnostic_item = "f32_legacy_const_max_10_exp" ]
212223pub const MAX_10_EXP : i32 = f32:: MAX_10_EXP ;
213224
214225/// Not a Number (NaN).
@@ -226,6 +237,7 @@ pub const MAX_10_EXP: i32 = f32::MAX_10_EXP;
226237/// ```
227238#[ stable( feature = "rust1" , since = "1.0.0" ) ]
228239#[ deprecated( since = "TBD" , note = "replaced by the `NAN` associated constant on `f32`" ) ]
240+ #[ rustc_diagnostic_item = "f32_legacy_const_nan" ]
229241pub const NAN : f32 = f32:: NAN ;
230242
231243/// Infinity (∞).
@@ -243,6 +255,7 @@ pub const NAN: f32 = f32::NAN;
243255/// ```
244256#[ stable( feature = "rust1" , since = "1.0.0" ) ]
245257#[ deprecated( since = "TBD" , note = "replaced by the `INFINITY` associated constant on `f32`" ) ]
258+ #[ rustc_diagnostic_item = "f32_legacy_const_infinity" ]
246259pub const INFINITY : f32 = f32:: INFINITY ;
247260
248261/// Negative infinity (−∞).
@@ -260,6 +273,7 @@ pub const INFINITY: f32 = f32::INFINITY;
260273/// ```
261274#[ stable( feature = "rust1" , since = "1.0.0" ) ]
262275#[ deprecated( since = "TBD" , note = "replaced by the `NEG_INFINITY` associated constant on `f32`" ) ]
276+ #[ rustc_diagnostic_item = "f32_legacy_const_neg_infinity" ]
263277pub const NEG_INFINITY : f32 = f32:: NEG_INFINITY ;
264278
265279/// Basic mathematical constants.
0 commit comments