Deprecate-in-future the constants superceded by RFC 2700
This commit is contained in:
@@ -1975,32 +1975,28 @@ macro_rules! int_impl {
|
||||
unsafe { mem::transmute(bytes) }
|
||||
}
|
||||
|
||||
/// **This method is soft-deprecated.**
|
||||
///
|
||||
/// Although using it won’t cause a compilation warning, new code should use
|
||||
#[doc = concat!("[`", stringify!($SelfT), "::MIN", "`](#associatedconstant.MIN)")]
|
||||
/// instead.
|
||||
/// New code should prefer to use
|
||||
#[doc = concat!("[`", stringify!($SelfT), "::MIN", "`](#associatedconstant.MIN).")]
|
||||
///
|
||||
/// Returns the smallest value that can be represented by this integer type.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[inline(always)]
|
||||
#[rustc_promotable]
|
||||
#[rustc_const_stable(feature = "const_min_value", since = "1.32.0")]
|
||||
#[rustc_deprecated(since = "TBD", reason = "replaced by the `MIN` associated constant on this type")]
|
||||
pub const fn min_value() -> Self {
|
||||
Self::MIN
|
||||
}
|
||||
|
||||
/// **This method is soft-deprecated.**
|
||||
///
|
||||
/// Although using it won’t cause a compilation warning, new code should use
|
||||
#[doc = concat!("[`", stringify!($SelfT), "::MAX", "`](#associatedconstant.MAX)")]
|
||||
/// instead.
|
||||
/// New code should prefer to use
|
||||
#[doc = concat!("[`", stringify!($SelfT), "::MAX", "`](#associatedconstant.MAX).")]
|
||||
///
|
||||
/// Returns the largest value that can be represented by this integer type.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[inline(always)]
|
||||
#[rustc_promotable]
|
||||
#[rustc_const_stable(feature = "const_max_value", since = "1.32.0")]
|
||||
#[rustc_deprecated(since = "TBD", reason = "replaced by the `MAX` associated constant on this type")]
|
||||
pub const fn max_value() -> Self {
|
||||
Self::MAX
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user