Convert core/num/mod.rs to intra-doc links
This commit is contained in:
parent
446d4533e8
commit
2179313dcf
@ -56,9 +56,6 @@ fn from(never: !) -> TryFromIntError {
|
||||
/// in the string e.g., when it is obtained from the standard input.
|
||||
/// Using the [`str.trim()`] method ensures that no whitespace remains before parsing.
|
||||
///
|
||||
/// [`str.trim()`]: ../../std/primitive.str.html#method.trim
|
||||
/// [`i8::from_str_radix`]: ../../std/primitive.i8.html#method.from_str_radix
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
/// ```
|
||||
|
@ -18,7 +18,7 @@
|
||||
use crate::num::FpCategory;
|
||||
|
||||
/// The radix or base of the internal representation of `f32`.
|
||||
/// Use [`f32::RADIX`](../../std/primitive.f32.html#associatedconstant.RADIX) instead.
|
||||
/// Use [`f32::RADIX`] instead.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -832,8 +832,8 @@ pub const fn from_bits(v: u32) -> Self {
|
||||
/// As the target platform's native endianness is used, portable code
|
||||
/// should use [`to_be_bytes`] or [`to_le_bytes`], as appropriate, instead.
|
||||
///
|
||||
/// [`to_be_bytes`]: #method.to_be_bytes
|
||||
/// [`to_le_bytes`]: #method.to_le_bytes
|
||||
/// [`to_be_bytes`]: f32::to_be_bytes
|
||||
/// [`to_le_bytes`]: f32::to_le_bytes
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -860,7 +860,7 @@ pub const fn from_bits(v: u32) -> Self {
|
||||
///
|
||||
/// [`to_ne_bytes`] should be preferred over this whenever possible.
|
||||
///
|
||||
/// [`to_ne_bytes`]: #method.to_ne_bytes
|
||||
/// [`to_ne_bytes`]: f32::to_ne_bytes
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -920,8 +920,8 @@ pub const fn from_bits(v: u32) -> Self {
|
||||
/// likely wants to use [`from_be_bytes`] or [`from_le_bytes`], as
|
||||
/// appropriate instead.
|
||||
///
|
||||
/// [`from_be_bytes`]: #method.from_be_bytes
|
||||
/// [`from_le_bytes`]: #method.from_le_bytes
|
||||
/// [`from_be_bytes`]: f32::from_be_bytes
|
||||
/// [`from_le_bytes`]: f32::from_le_bytes
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
@ -846,8 +846,8 @@ pub const fn from_bits(v: u64) -> Self {
|
||||
/// As the target platform's native endianness is used, portable code
|
||||
/// should use [`to_be_bytes`] or [`to_le_bytes`], as appropriate, instead.
|
||||
///
|
||||
/// [`to_be_bytes`]: #method.to_be_bytes
|
||||
/// [`to_le_bytes`]: #method.to_le_bytes
|
||||
/// [`to_be_bytes`]: f64::to_be_bytes
|
||||
/// [`to_le_bytes`]: f64::to_le_bytes
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -874,7 +874,7 @@ pub const fn from_bits(v: u64) -> Self {
|
||||
///
|
||||
/// [`to_ne_bytes`] should be preferred over this whenever possible.
|
||||
///
|
||||
/// [`to_ne_bytes`]: #method.to_ne_bytes
|
||||
/// [`to_ne_bytes`]: f64::to_ne_bytes
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -934,8 +934,8 @@ pub const fn from_bits(v: u64) -> Self {
|
||||
/// likely wants to use [`from_be_bytes`] or [`from_le_bytes`], as
|
||||
/// appropriate instead.
|
||||
///
|
||||
/// [`from_be_bytes`]: #method.from_be_bytes
|
||||
/// [`from_le_bytes`]: #method.from_le_bytes
|
||||
/// [`from_be_bytes`]: f64::from_be_bytes
|
||||
/// [`from_le_bytes`]: f64::from_le_bytes
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
@ -1067,7 +1067,7 @@ pub const fn wrapping_neg(self) -> Self {
|
||||
///
|
||||
/// Note that this is *not* the same as a rotate-left; the RHS of a wrapping shift-left is restricted to
|
||||
/// the range of the type, rather than the bits shifted out of the LHS being returned to the other end.
|
||||
/// The primitive integer types all implement a [`rotate_left`](#method.rotate_left) function,
|
||||
/// The primitive integer types all implement a [`rotate_left`](Self::rotate_left) function,
|
||||
/// which may be what you want instead.
|
||||
///
|
||||
/// # Examples
|
||||
@ -1096,7 +1096,7 @@ pub const fn wrapping_shl(self, rhs: u32) -> Self {
|
||||
///
|
||||
/// Note that this is *not* the same as a rotate-right; the RHS of a wrapping shift-right is restricted
|
||||
/// to the range of the type, rather than the bits shifted out of the LHS being returned to the other
|
||||
/// end. The primitive integer types all implement a [`rotate_right`](#method.rotate_right) function,
|
||||
/// end. The primitive integer types all implement a [`rotate_right`](Self::rotate_right) function,
|
||||
/// which may be what you want instead.
|
||||
///
|
||||
/// # Examples
|
||||
@ -1812,8 +1812,8 @@ pub const fn is_negative(self) -> bool { self < 0 }
|
||||
///
|
||||
#[doc = $to_xe_bytes_doc]
|
||||
///
|
||||
/// [`to_be_bytes`]: #method.to_be_bytes
|
||||
/// [`to_le_bytes`]: #method.to_le_bytes
|
||||
/// [`to_be_bytes`]: Self::to_be_bytes
|
||||
/// [`to_le_bytes`]: Self::to_le_bytes
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -1845,7 +1845,7 @@ pub const fn is_negative(self) -> bool { self < 0 }
|
||||
///
|
||||
/// [`to_ne_bytes`] should be preferred over this whenever possible.
|
||||
///
|
||||
/// [`to_ne_bytes`]: #method.to_ne_bytes
|
||||
/// [`to_ne_bytes`]: Self::to_ne_bytes
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -1937,8 +1937,8 @@ pub const fn is_negative(self) -> bool { self < 0 }
|
||||
/// likely wants to use [`from_be_bytes`] or [`from_le_bytes`], as
|
||||
/// appropriate instead.
|
||||
///
|
||||
/// [`from_be_bytes`]: #method.from_be_bytes
|
||||
/// [`from_le_bytes`]: #method.from_le_bytes
|
||||
/// [`from_be_bytes`]: Self::from_be_bytes
|
||||
/// [`from_le_bytes`]: Self::from_le_bytes
|
||||
///
|
||||
#[doc = $to_xe_bytes_doc]
|
||||
///
|
||||
@ -1976,7 +1976,7 @@ pub const fn is_negative(self) -> bool { self < 0 }
|
||||
}
|
||||
|
||||
/// New code should prefer to use
|
||||
#[doc = concat!("[`", stringify!($SelfT), "::MIN", "`](#associatedconstant.MIN).")]
|
||||
#[doc = concat!("[`", stringify!($SelfT), "::MIN", "`] instead.")]
|
||||
///
|
||||
/// Returns the smallest value that can be represented by this integer type.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
@ -1989,7 +1989,7 @@ pub const fn min_value() -> Self {
|
||||
}
|
||||
|
||||
/// New code should prefer to use
|
||||
#[doc = concat!("[`", stringify!($SelfT), "::MAX", "`](#associatedconstant.MAX).")]
|
||||
#[doc = concat!("[`", stringify!($SelfT), "::MAX", "`] instead.")]
|
||||
///
|
||||
/// Returns the largest value that can be represented by this integer type.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
@ -193,7 +193,7 @@ pub const fn is_ascii(&self) -> bool {
|
||||
/// assert_eq!(65, lowercase_a.to_ascii_uppercase());
|
||||
/// ```
|
||||
///
|
||||
/// [`make_ascii_uppercase`]: #method.make_ascii_uppercase
|
||||
/// [`make_ascii_uppercase`]: Self::make_ascii_uppercase
|
||||
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
|
||||
#[inline]
|
||||
pub fn to_ascii_uppercase(&self) -> u8 {
|
||||
@ -216,7 +216,7 @@ pub fn to_ascii_uppercase(&self) -> u8 {
|
||||
/// assert_eq!(97, uppercase_a.to_ascii_lowercase());
|
||||
/// ```
|
||||
///
|
||||
/// [`make_ascii_lowercase`]: #method.make_ascii_lowercase
|
||||
/// [`make_ascii_lowercase`]: Self::make_ascii_lowercase
|
||||
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
|
||||
#[inline]
|
||||
pub fn to_ascii_lowercase(&self) -> u8 {
|
||||
@ -266,7 +266,7 @@ pub fn eq_ignore_ascii_case(&self, other: &u8) -> bool {
|
||||
/// assert_eq!(b'A', byte);
|
||||
/// ```
|
||||
///
|
||||
/// [`to_ascii_uppercase`]: #method.to_ascii_uppercase
|
||||
/// [`to_ascii_uppercase`]: Self::to_ascii_uppercase
|
||||
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
|
||||
#[inline]
|
||||
pub fn make_ascii_uppercase(&mut self) {
|
||||
@ -291,7 +291,7 @@ pub fn make_ascii_uppercase(&mut self) {
|
||||
/// assert_eq!(b'a', byte);
|
||||
/// ```
|
||||
///
|
||||
/// [`to_ascii_lowercase`]: #method.to_ascii_lowercase
|
||||
/// [`to_ascii_lowercase`]: Self::to_ascii_lowercase
|
||||
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
|
||||
#[inline]
|
||||
pub fn make_ascii_lowercase(&mut self) {
|
||||
@ -723,9 +723,6 @@ impl usize {
|
||||
/// This `enum` is used as the return type for [`f32::classify`] and [`f64::classify`]. See
|
||||
/// their documentation for more.
|
||||
///
|
||||
/// [`f32::classify`]: ../../std/primitive.f32.html#method.classify
|
||||
/// [`f64::classify`]: ../../std/primitive.f64.html#method.classify
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
|
@ -994,7 +994,7 @@ pub const fn wrapping_neg(self) -> Self {
|
||||
/// RHS of a wrapping shift-left is restricted to the range
|
||||
/// of the type, rather than the bits shifted out of the LHS
|
||||
/// being returned to the other end. The primitive integer
|
||||
/// types all implement a [`rotate_left`](#method.rotate_left) function,
|
||||
/// types all implement a [`rotate_left`](Self::rotate_left) function,
|
||||
/// which may be what you want instead.
|
||||
///
|
||||
/// # Examples
|
||||
@ -1026,7 +1026,7 @@ pub const fn wrapping_shl(self, rhs: u32) -> Self {
|
||||
/// RHS of a wrapping shift-right is restricted to the range
|
||||
/// of the type, rather than the bits shifted out of the LHS
|
||||
/// being returned to the other end. The primitive integer
|
||||
/// types all implement a [`rotate_right`](#method.rotate_right) function,
|
||||
/// types all implement a [`rotate_right`](Self::rotate_right) function,
|
||||
/// which may be what you want instead.
|
||||
///
|
||||
/// # Examples
|
||||
@ -1642,8 +1642,8 @@ pub const fn wrapping_next_power_of_two(self) -> Self {
|
||||
///
|
||||
#[doc = $to_xe_bytes_doc]
|
||||
///
|
||||
/// [`to_be_bytes`]: #method.to_be_bytes
|
||||
/// [`to_le_bytes`]: #method.to_le_bytes
|
||||
/// [`to_be_bytes`]: Self::to_be_bytes
|
||||
/// [`to_le_bytes`]: Self::to_le_bytes
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -1675,7 +1675,7 @@ pub const fn wrapping_next_power_of_two(self) -> Self {
|
||||
///
|
||||
/// [`to_ne_bytes`] should be preferred over this whenever possible.
|
||||
///
|
||||
/// [`to_ne_bytes`]: #method.to_ne_bytes
|
||||
/// [`to_ne_bytes`]: Self::to_ne_bytes
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -1767,8 +1767,8 @@ pub const fn wrapping_next_power_of_two(self) -> Self {
|
||||
/// likely wants to use [`from_be_bytes`] or [`from_le_bytes`], as
|
||||
/// appropriate instead.
|
||||
///
|
||||
/// [`from_be_bytes`]: #method.from_be_bytes
|
||||
/// [`from_le_bytes`]: #method.from_le_bytes
|
||||
/// [`from_be_bytes`]: Self::from_be_bytes
|
||||
/// [`from_le_bytes`]: Self::from_le_bytes
|
||||
///
|
||||
#[doc = $from_xe_bytes_doc]
|
||||
///
|
||||
@ -1806,8 +1806,7 @@ pub const fn wrapping_next_power_of_two(self) -> Self {
|
||||
}
|
||||
|
||||
/// New code should prefer to use
|
||||
#[doc = concat!("[`", stringify!($SelfT), "::MIN", "`](#associatedconstant.MIN).")]
|
||||
/// instead.
|
||||
#[doc = concat!("[`", stringify!($SelfT), "::MIN", "`] instead.")]
|
||||
///
|
||||
/// Returns the smallest value that can be represented by this integer type.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
@ -1818,8 +1817,7 @@ pub const fn wrapping_next_power_of_two(self) -> Self {
|
||||
pub const fn min_value() -> Self { Self::MIN }
|
||||
|
||||
/// New code should prefer to use
|
||||
#[doc = concat!("[`", stringify!($SelfT), "::MAX", "`](#associatedconstant.MAX).")]
|
||||
/// instead.
|
||||
#[doc = concat!("[`", stringify!($SelfT), "::MAX", "`] instead.")]
|
||||
///
|
||||
/// Returns the largest value that can be represented by this integer type.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
Loading…
Reference in New Issue
Block a user