Add "soft deprecation" notice to old min/max_value() docs
This commit is contained in:
parent
271ba5a3ea
commit
35298349c3
1 changed files with 60 additions and 40 deletions
|
|
@ -279,28 +279,6 @@ $EndFeature, "
|
|||
pub const MAX: Self = !Self::MIN;
|
||||
}
|
||||
|
||||
doc_comment! {
|
||||
"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")]
|
||||
pub const fn min_value() -> Self {
|
||||
Self::MIN
|
||||
}
|
||||
}
|
||||
|
||||
doc_comment! {
|
||||
"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")]
|
||||
pub const fn max_value() -> Self {
|
||||
Self::MAX
|
||||
}
|
||||
}
|
||||
|
||||
doc_comment! {
|
||||
concat!("Converts a string slice in a given base to an integer.
|
||||
|
||||
|
|
@ -2351,6 +2329,38 @@ fn read_ne_", stringify!($SelfT), "(input: &mut &[u8]) -> ", stringify!($SelfT),
|
|||
unsafe { mem::transmute(bytes) }
|
||||
}
|
||||
}
|
||||
|
||||
doc_comment! {
|
||||
concat!("**This method is soft-deprecated.**
|
||||
|
||||
Although using it won’t cause compilation warning,
|
||||
new code should use [`", stringify!($SelfT), "::MIN", "`](#associatedconstant.MIN) instead.
|
||||
|
||||
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")]
|
||||
pub const fn min_value() -> Self {
|
||||
Self::MIN
|
||||
}
|
||||
}
|
||||
|
||||
doc_comment! {
|
||||
concat!("**This method is soft-deprecated.**
|
||||
|
||||
Although using it won’t cause compilation warning,
|
||||
new code should use [`", stringify!($SelfT), "::MAX", "`](#associatedconstant.MAX) instead.
|
||||
|
||||
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")]
|
||||
pub const fn max_value() -> Self {
|
||||
Self::MAX
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2454,24 +2464,6 @@ $EndFeature, "
|
|||
pub const MAX: Self = !0;
|
||||
}
|
||||
|
||||
doc_comment! {
|
||||
"Returns the smallest value that can be represented by this integer type.",
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_promotable]
|
||||
#[inline(always)]
|
||||
#[rustc_const_stable(feature = "const_max_value", since = "1.32.0")]
|
||||
pub const fn min_value() -> Self { Self::MIN }
|
||||
}
|
||||
|
||||
doc_comment! {
|
||||
"Returns the largest value that can be represented by this integer type.",
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_promotable]
|
||||
#[inline(always)]
|
||||
#[rustc_const_stable(feature = "const_max_value", since = "1.32.0")]
|
||||
pub const fn max_value() -> Self { Self::MAX }
|
||||
}
|
||||
|
||||
doc_comment! {
|
||||
concat!("Converts a string slice in a given base to an integer.
|
||||
|
||||
|
|
@ -4277,6 +4269,34 @@ fn read_ne_", stringify!($SelfT), "(input: &mut &[u8]) -> ", stringify!($SelfT),
|
|||
unsafe { mem::transmute(bytes) }
|
||||
}
|
||||
}
|
||||
|
||||
doc_comment! {
|
||||
concat!("**This method is soft-deprecated.**
|
||||
|
||||
Although using it won’t cause compilation warning,
|
||||
new code should use [`", stringify!($SelfT), "::MIN", "`](#associatedconstant.MIN) instead.
|
||||
|
||||
Returns the smallest value that can be represented by this integer type."),
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_promotable]
|
||||
#[inline(always)]
|
||||
#[rustc_const_stable(feature = "const_max_value", since = "1.32.0")]
|
||||
pub const fn min_value() -> Self { Self::MIN }
|
||||
}
|
||||
|
||||
doc_comment! {
|
||||
concat!("**This method is soft-deprecated.**
|
||||
|
||||
Although using it won’t cause compilation warning,
|
||||
new code should use [`", stringify!($SelfT), "::MAX", "`](#associatedconstant.MAX) instead.
|
||||
|
||||
Returns the largest value that can be represented by this integer type."),
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_promotable]
|
||||
#[inline(always)]
|
||||
#[rustc_const_stable(feature = "const_max_value", since = "1.32.0")]
|
||||
pub const fn max_value() -> Self { Self::MAX }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue