@@ -1563,38 +1563,38 @@ from_str_radix! { signed i8 i16 i32 i64 i128 }
1563
1563
macro_rules! from_str_radix_size_impl {
1564
1564
( $( $signedness: ident $t: ident $size: ty) ,* ) => { $(
1565
1565
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
+ /// ```
1598
1598
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1599
1599
#[ rustc_const_unstable( feature = "const_int_from_str" , issue = "59133" ) ]
1600
1600
pub const fn from_str_radix( src: & str , radix: u32 ) -> Result <$size, ParseIntError > {
0 commit comments