Skip to content

Commit 1be4156

Browse files
committed
Rollup merge of rust-lang#25583 - steveklabnik:gh25517, r=alexcrichton
Fixes rust-lang#25517
2 parents e2922c1 + 1254c34 commit 1be4156

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/libcore/num/mod.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -132,15 +132,11 @@ macro_rules! int_impl {
132132
///
133133
/// Leading and trailing whitespace represent an error.
134134
///
135-
/// # Arguments
136-
///
137-
/// * src - A string slice
138-
/// * radix - The base to use. Must lie in the range [2 .. 36]
139-
///
140-
/// # Return value
135+
/// # Examples
141136
///
142-
/// `Err(ParseIntError)` if the string did not represent a valid number.
143-
/// Otherwise, `Ok(n)` where `n` is the integer represented by `src`.
137+
/// ```
138+
/// assert_eq!(u32::from_str_radix("A", 16), Some(10));
139+
/// ```
144140
#[stable(feature = "rust1", since = "1.0.0")]
145141
#[allow(deprecated)]
146142
pub fn from_str_radix(src: &str, radix: u32) -> Result<$T, ParseIntError> {

0 commit comments

Comments
 (0)