@@ -32,6 +32,7 @@ use crate::num::FpCategory;
32
32
/// ```
33
33
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
34
34
#[ deprecated( since = "TBD" , note = "replaced by the `RADIX` associated constant on `f32`" ) ]
35
+ #[ rustc_diagnostic_item = "f32_legacy_const_radix" ]
35
36
pub const RADIX : u32 = f32:: RADIX ;
36
37
37
38
/// Number of significant digits in base 2.
@@ -52,6 +53,7 @@ pub const RADIX: u32 = f32::RADIX;
52
53
since = "TBD" ,
53
54
note = "replaced by the `MANTISSA_DIGITS` associated constant on `f32`"
54
55
) ]
56
+ #[ rustc_diagnostic_item = "f32_legacy_const_mantissa_dig" ]
55
57
pub const MANTISSA_DIGITS : u32 = f32:: MANTISSA_DIGITS ;
56
58
57
59
/// Approximate number of significant digits in base 10.
@@ -69,6 +71,7 @@ pub const MANTISSA_DIGITS: u32 = f32::MANTISSA_DIGITS;
69
71
/// ```
70
72
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
71
73
#[ deprecated( since = "TBD" , note = "replaced by the `DIGITS` associated constant on `f32`" ) ]
74
+ #[ rustc_diagnostic_item = "f32_legacy_const_digits" ]
72
75
pub const DIGITS : u32 = f32:: DIGITS ;
73
76
74
77
/// [Machine epsilon] value for `f32`.
@@ -90,6 +93,7 @@ pub const DIGITS: u32 = f32::DIGITS;
90
93
/// ```
91
94
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
92
95
#[ deprecated( since = "TBD" , note = "replaced by the `EPSILON` associated constant on `f32`" ) ]
96
+ #[ rustc_diagnostic_item = "f32_legacy_const_epsilon" ]
93
97
pub const EPSILON : f32 = f32:: EPSILON ;
94
98
95
99
/// Smallest finite `f32` value.
@@ -107,6 +111,7 @@ pub const EPSILON: f32 = f32::EPSILON;
107
111
/// ```
108
112
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
109
113
#[ deprecated( since = "TBD" , note = "replaced by the `MIN` associated constant on `f32`" ) ]
114
+ #[ rustc_diagnostic_item = "f32_legacy_const_min" ]
110
115
pub const MIN : f32 = f32:: MIN ;
111
116
112
117
/// Smallest positive normal `f32` value.
@@ -124,6 +129,7 @@ pub const MIN: f32 = f32::MIN;
124
129
/// ```
125
130
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
126
131
#[ deprecated( since = "TBD" , note = "replaced by the `MIN_POSITIVE` associated constant on `f32`" ) ]
132
+ #[ rustc_diagnostic_item = "f32_legacy_const_min_positive" ]
127
133
pub const MIN_POSITIVE : f32 = f32:: MIN_POSITIVE ;
128
134
129
135
/// Largest finite `f32` value.
@@ -141,6 +147,7 @@ pub const MIN_POSITIVE: f32 = f32::MIN_POSITIVE;
141
147
/// ```
142
148
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
143
149
#[ deprecated( since = "TBD" , note = "replaced by the `MAX` associated constant on `f32`" ) ]
150
+ #[ rustc_diagnostic_item = "f32_legacy_const_max" ]
144
151
pub const MAX : f32 = f32:: MAX ;
145
152
146
153
/// One greater than the minimum possible normal power of 2 exponent.
@@ -158,6 +165,7 @@ pub const MAX: f32 = f32::MAX;
158
165
/// ```
159
166
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
160
167
#[ deprecated( since = "TBD" , note = "replaced by the `MIN_EXP` associated constant on `f32`" ) ]
168
+ #[ rustc_diagnostic_item = "f32_legacy_const_min_exp" ]
161
169
pub const MIN_EXP : i32 = f32:: MIN_EXP ;
162
170
163
171
/// Maximum possible power of 2 exponent.
@@ -175,6 +183,7 @@ pub const MIN_EXP: i32 = f32::MIN_EXP;
175
183
/// ```
176
184
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
177
185
#[ deprecated( since = "TBD" , note = "replaced by the `MAX_EXP` associated constant on `f32`" ) ]
186
+ #[ rustc_diagnostic_item = "f32_legacy_const_max_exp" ]
178
187
pub const MAX_EXP : i32 = f32:: MAX_EXP ;
179
188
180
189
/// Minimum possible normal power of 10 exponent.
@@ -192,6 +201,7 @@ pub const MAX_EXP: i32 = f32::MAX_EXP;
192
201
/// ```
193
202
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
194
203
#[ deprecated( since = "TBD" , note = "replaced by the `MIN_10_EXP` associated constant on `f32`" ) ]
204
+ #[ rustc_diagnostic_item = "f32_legacy_const_min_10_exp" ]
195
205
pub const MIN_10_EXP : i32 = f32:: MIN_10_EXP ;
196
206
197
207
/// Maximum possible power of 10 exponent.
@@ -209,6 +219,7 @@ pub const MIN_10_EXP: i32 = f32::MIN_10_EXP;
209
219
/// ```
210
220
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
211
221
#[ deprecated( since = "TBD" , note = "replaced by the `MAX_10_EXP` associated constant on `f32`" ) ]
222
+ #[ rustc_diagnostic_item = "f32_legacy_const_max_10_exp" ]
212
223
pub const MAX_10_EXP : i32 = f32:: MAX_10_EXP ;
213
224
214
225
/// Not a Number (NaN).
@@ -226,6 +237,7 @@ pub const MAX_10_EXP: i32 = f32::MAX_10_EXP;
226
237
/// ```
227
238
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
228
239
#[ deprecated( since = "TBD" , note = "replaced by the `NAN` associated constant on `f32`" ) ]
240
+ #[ rustc_diagnostic_item = "f32_legacy_const_nan" ]
229
241
pub const NAN : f32 = f32:: NAN ;
230
242
231
243
/// Infinity (∞).
@@ -243,6 +255,7 @@ pub const NAN: f32 = f32::NAN;
243
255
/// ```
244
256
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
245
257
#[ deprecated( since = "TBD" , note = "replaced by the `INFINITY` associated constant on `f32`" ) ]
258
+ #[ rustc_diagnostic_item = "f32_legacy_const_infinity" ]
246
259
pub const INFINITY : f32 = f32:: INFINITY ;
247
260
248
261
/// Negative infinity (−∞).
@@ -260,6 +273,7 @@ pub const INFINITY: f32 = f32::INFINITY;
260
273
/// ```
261
274
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
262
275
#[ deprecated( since = "TBD" , note = "replaced by the `NEG_INFINITY` associated constant on `f32`" ) ]
276
+ #[ rustc_diagnostic_item = "f32_legacy_const_neg_infinity" ]
263
277
pub const NEG_INFINITY : f32 = f32:: NEG_INFINITY ;
264
278
265
279
/// Basic mathematical constants.
0 commit comments