]> git.lizzy.rs Git - rust.git/blobdiff - src/libcore/char/convert.rs
Adjusted some doctests in libcore to use `should_panic`.
[rust.git] / src / libcore / char / convert.rs
index 87c56c4b0a1059b50bf5cf22577536196500e4b5..d7e39946148ed793fd1eb0b175f275305f92df08 100644 (file)
@@ -278,16 +278,11 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
 ///
 /// Passing a large radix, causing a panic:
 ///
-/// ```
-/// use std::thread;
+/// ```should_panic
 /// use std::char;
 ///
-/// let result = thread::spawn(|| {
-///     // this panics
-///     let c = char::from_digit(1, 37);
-/// }).join();
-///
-/// assert!(result.is_err());
+/// // this panics
+/// let c = char::from_digit(1, 37);
 /// ```
 #[inline]
 #[stable(feature = "rust1", since = "1.0.0")]