| 1 | #![doc (hidden)] |
| 2 | |
| 3 | macro_rules! int_module { |
| 4 | ($T:ident) => (int_module!($T, #[stable(feature = "rust1" , since = "1.0.0" )]);); |
| 5 | ($T:ident, #[$attr:meta]) => ( |
| 6 | #[doc = concat!( |
| 7 | "The smallest value that can be represented by this integer type. Use " , |
| 8 | "[`" , stringify!($T), "::MIN" , "`] instead." |
| 9 | )] |
| 10 | /// |
| 11 | /// # Examples |
| 12 | /// |
| 13 | /// ```rust |
| 14 | /// // deprecated way |
| 15 | #[doc = concat!("let min = std::" , stringify!($T), "::MIN;" )] |
| 16 | /// |
| 17 | /// // intended way |
| 18 | #[doc = concat!("let min = " , stringify!($T), "::MIN;" )] |
| 19 | /// ``` |
| 20 | /// |
| 21 | #[$attr] |
| 22 | #[deprecated(since = "TBD" , note = "replaced by the `MIN` associated constant on this type" )] |
| 23 | #[rustc_diagnostic_item = concat!(stringify!($T), "_legacy_const_min" )] |
| 24 | pub const MIN: $T = $T::MIN; |
| 25 | |
| 26 | #[doc = concat!( |
| 27 | "The largest value that can be represented by this integer type. Use " , |
| 28 | "[`" , stringify!($T), "::MAX" , "`] instead." |
| 29 | )] |
| 30 | /// |
| 31 | /// # Examples |
| 32 | /// |
| 33 | /// ```rust |
| 34 | /// // deprecated way |
| 35 | #[doc = concat!("let max = std::" , stringify!($T), "::MAX;" )] |
| 36 | /// |
| 37 | /// // intended way |
| 38 | #[doc = concat!("let max = " , stringify!($T), "::MAX;" )] |
| 39 | /// ``` |
| 40 | /// |
| 41 | #[$attr] |
| 42 | #[deprecated(since = "TBD" , note = "replaced by the `MAX` associated constant on this type" )] |
| 43 | #[rustc_diagnostic_item = concat!(stringify!($T), "_legacy_const_max" )] |
| 44 | pub const MAX: $T = $T::MAX; |
| 45 | ) |
| 46 | } |
| 47 | |