diff options
| author | Steve Klabnik <steve@steveklabnik.com> | 2015-05-19 18:38:53 -0400 |
|---|---|---|
| committer | Steve Klabnik <steve@steveklabnik.com> | 2015-05-19 18:38:53 -0400 |
| commit | 07c25d4ca0751e4244fe92626c2b351c849e3add (patch) | |
| tree | b14c75634f4c091531fd8838dbcc8618e1696117 /src/libcore/num | |
| parent | f34ff7af7362053e8aee7a35365d6320ed6e88b8 (diff) | |
| parent | 1254c34032673d5f9d7775d894bc58e7ad68ba01 (diff) | |
| download | rust-07c25d4ca0751e4244fe92626c2b351c849e3add.tar.gz rust-07c25d4ca0751e4244fe92626c2b351c849e3add.zip | |
Rollup merge of #25583 - steveklabnik:gh25517, r=alexcrichton
Fixes #25517
Diffstat (limited to 'src/libcore/num')
| -rw-r--r-- | src/libcore/num/mod.rs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index bd7286dfa3f..91faba7376b 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -132,15 +132,11 @@ macro_rules! int_impl { /// /// Leading and trailing whitespace represent an error. /// - /// # Arguments - /// - /// * src - A string slice - /// * radix - The base to use. Must lie in the range [2 .. 36] - /// - /// # Return value + /// # Examples /// - /// `Err(ParseIntError)` if the string did not represent a valid number. - /// Otherwise, `Ok(n)` where `n` is the integer represented by `src`. + /// ``` + /// assert_eq!(u32::from_str_radix("A", 16), Some(10)); + /// ``` #[stable(feature = "rust1", since = "1.0.0")] #[allow(deprecated)] pub fn from_str_radix(src: &str, radix: u32) -> Result<$T, ParseIntError> { |
