diff --git a/library/core/src/num/mod.rs b/library/core/src/num/mod.rs index f4930ca5c7dbd..e18c81f770777 100644 --- a/library/core/src/num/mod.rs +++ b/library/core/src/num/mod.rs @@ -1433,6 +1433,7 @@ macro_rules! from_str_radix_int_impl { #[stable(feature = "rust1", since = "1.0.0")] impl FromStr for $t { type Err = ParseIntError; + #[inline] fn from_str(src: &str) -> Result { <$t>::from_str_radix(src, 10) } @@ -1505,6 +1506,7 @@ macro_rules! from_str_radix { /// ``` #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_stable(feature = "const_int_from_str", since = "1.82.0")] + #[inline] pub const fn from_str_radix(src: &str, radix: u32) -> Result<$int_ty, ParseIntError> { use self::IntErrorKind::*; use self::ParseIntError as PIE; @@ -1649,6 +1651,7 @@ macro_rules! from_str_radix_size_impl { /// ``` #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_stable(feature = "const_int_from_str", since = "1.82.0")] + #[inline] pub const fn from_str_radix(src: &str, radix: u32) -> Result<$size, ParseIntError> { match <$t>::from_str_radix(src, radix) { Ok(x) => Ok(x as $size),