Skip to content

Commit 3400023

Browse files
committed
fix tests
1 parent 3b7fe5b commit 3400023

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/libstd/path.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ enum State {
408408
/// assert_eq!(Prefix::Disk(b'C'), prefix_component.kind());
409409
/// assert_eq!(OsStr::new("c:"), prefix_component.as_os_str());
410410
/// }
411-
/// _ => unsafe { ::core::hint::unreachable_unchecked() },
411+
/// _ => unreachable!(),
412412
/// }
413413
/// # }
414414
/// ```

src/libstd/sync/rwlock.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ impl<T: ?Sized> RwLock<T> {
224224
///
225225
/// match lock.try_read() {
226226
/// Ok(n) => assert_eq!(*n, 1),
227-
/// Err(_) => unsafe { ::core::hint::unreachable_unchecked() },
227+
/// Err(_) => unreachable!(),
228228
/// };
229229
/// ```
230230
#[inline]

src/libstd/sys_common/poison.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ pub struct Guard {
8282
/// }).join();
8383
///
8484
/// match mutex.lock() {
85-
/// Ok(_) => unsafe { ::core::hint::unreachable_unchecked() },
85+
/// Ok(_) => unreachable!(),
8686
/// Err(p_err) => {
8787
/// let data = p_err.get_ref();
8888
/// println!("recovered: {}", data);

0 commit comments

Comments
 (0)