Deprecate-in-future the constants superceded by RFC 2700
This commit is contained in:
parent
a4cbb44ae2
commit
6f3df00610
26 changed files with 241 additions and 98 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue