Skip to content

Commit 7391ffd

Browse files
committed
Fix indentation in from_str_radix_size_impl
1 parent ed3b774 commit 7391ffd

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

library/core/src/num/mod.rs

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1563,38 +1563,38 @@ from_str_radix! { signed i8 i16 i32 i64 i128 }
15631563
macro_rules! from_str_radix_size_impl {
15641564
($($signedness:ident $t:ident $size:ty),*) => {$(
15651565
impl $size {
1566-
/// Converts a string slice in a given base to an integer.
1567-
///
1568-
/// The string is expected to be an optional
1569-
#[doc = sign_dependent_expr!{
1570-
$signedness ?
1571-
if signed {
1572-
" `+` or `-` "
1573-
}
1574-
if unsigned {
1575-
" `+` "
1576-
}
1577-
}]
1578-
/// sign followed by only digits. Leading and trailing non-digit characters (including
1579-
/// whitespace) represent an error. Underscores (which are accepted in rust literals)
1580-
/// also represent an error.
1581-
///
1582-
/// Digits are a subset of these characters, depending on `radix`:
1583-
/// * `0-9`
1584-
/// * `a-z`
1585-
/// * `A-Z`
1586-
///
1587-
/// # Panics
1588-
///
1589-
/// This function panics if `radix` is not in the range from 2 to 36.
1590-
///
1591-
/// # Examples
1592-
///
1593-
/// Basic usage:
1594-
///
1595-
/// ```
1596-
#[doc = concat!("assert_eq!(", stringify!($int_ty), "::from_str_radix(\"A\", 16), Ok(10));")]
1597-
/// ```
1566+
/// Converts a string slice in a given base to an integer.
1567+
///
1568+
/// The string is expected to be an optional
1569+
#[doc = sign_dependent_expr!{
1570+
$signedness ?
1571+
if signed {
1572+
" `+` or `-` "
1573+
}
1574+
if unsigned {
1575+
" `+` "
1576+
}
1577+
}]
1578+
/// sign followed by only digits. Leading and trailing non-digit characters (including
1579+
/// whitespace) represent an error. Underscores (which are accepted in rust literals)
1580+
/// also represent an error.
1581+
///
1582+
/// Digits are a subset of these characters, depending on `radix`:
1583+
/// * `0-9`
1584+
/// * `a-z`
1585+
/// * `A-Z`
1586+
///
1587+
/// # Panics
1588+
///
1589+
/// This function panics if `radix` is not in the range from 2 to 36.
1590+
///
1591+
/// # Examples
1592+
///
1593+
/// Basic usage:
1594+
///
1595+
/// ```
1596+
#[doc = concat!("assert_eq!(", stringify!($int_ty), "::from_str_radix(\"A\", 16), Ok(10));")]
1597+
/// ```
15981598
#[stable(feature = "rust1", since = "1.0.0")]
15991599
#[rustc_const_unstable(feature = "const_int_from_str", issue = "59133")]
16001600
pub const fn from_str_radix(src: &str, radix: u32) -> Result<$size, ParseIntError> {

0 commit comments

Comments
 (0)