1
Fork 0

Rollup merge of #127765 - bitfield:fix_stdlib_doc_nits, r=dtolnay

Fix doc nits

Many tiny changes to stdlib doc comments to make them consistent (for example "Returns foo", rather than "Return foo"), adding missing periods, paragraph breaks, backticks for monospace style, and other minor nits.
This commit is contained in:
Guillaume Gomez 2024-07-28 20:07:44 +02:00 committed by GitHub
commit 506a6317be
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
146 changed files with 808 additions and 738 deletions

View file

@ -2197,10 +2197,11 @@ macro_rules! int_impl {
acc.wrapping_mul(base)
}
/// Calculates `self` + `rhs`
/// Calculates `self` + `rhs`.
///
/// Returns a tuple of the addition along with a boolean indicating whether an arithmetic overflow would
/// occur. If an overflow would have occurred then the wrapped value is returned.
/// Returns a tuple of the addition along with a boolean indicating
/// whether an arithmetic overflow would occur. If an overflow would have
/// occurred then the wrapped value is returned.
///
/// # Examples
///
@ -2278,7 +2279,7 @@ macro_rules! int_impl {
(c, b != d)
}
/// Calculates `self` + `rhs` with an unsigned `rhs`
/// Calculates `self` + `rhs` with an unsigned `rhs`.
///
/// Returns a tuple of the addition along with a boolean indicating
/// whether an arithmetic overflow would occur. If an overflow would
@ -3391,7 +3392,7 @@ macro_rules! int_impl {
#[inline(always)]
pub const fn is_negative(self) -> bool { self < 0 }
/// Return the memory representation of this integer as a byte array in
/// Returns the memory representation of this integer as a byte array in
/// big-endian (network) byte order.
///
#[doc = $to_xe_bytes_doc]
@ -3411,7 +3412,7 @@ macro_rules! int_impl {
self.to_be().to_ne_bytes()
}
/// Return the memory representation of this integer as a byte array in
/// Returns the memory representation of this integer as a byte array in
/// little-endian byte order.
///
#[doc = $to_xe_bytes_doc]
@ -3431,7 +3432,7 @@ macro_rules! int_impl {
self.to_le().to_ne_bytes()
}
/// Return the memory representation of this integer as a byte array in
/// Returns the memory representation of this integer as a byte array in
/// native byte order.
///
/// As the target platform's native endianness is used, portable code
@ -3469,7 +3470,7 @@ macro_rules! int_impl {
unsafe { mem::transmute(self) }
}
/// Create an integer value from its representation as a byte array in
/// Creates an integer value from its representation as a byte array in
/// big endian.
///
#[doc = $from_xe_bytes_doc]
@ -3498,7 +3499,7 @@ macro_rules! int_impl {
Self::from_be(Self::from_ne_bytes(bytes))
}
/// Create an integer value from its representation as a byte array in
/// Creates an integer value from its representation as a byte array in
/// little endian.
///
#[doc = $from_xe_bytes_doc]
@ -3527,7 +3528,7 @@ macro_rules! int_impl {
Self::from_le(Self::from_ne_bytes(bytes))
}
/// Create an integer value from its memory representation as a byte
/// Creates an integer value from its memory representation as a byte
/// array in native endianness.
///
/// As the target platform's native endianness is used, portable code