File tree 3 files changed +3
-3
lines changed
3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -408,7 +408,7 @@ enum State {
408
408
/// assert_eq!(Prefix::Disk(b'C'), prefix_component.kind());
409
409
/// assert_eq!(OsStr::new("c:"), prefix_component.as_os_str());
410
410
/// }
411
- /// _ => unsafe { ::core::hint::unreachable_unchecked() } ,
411
+ /// _ => unreachable!() ,
412
412
/// }
413
413
/// # }
414
414
/// ```
Original file line number Diff line number Diff line change @@ -224,7 +224,7 @@ impl<T: ?Sized> RwLock<T> {
224
224
///
225
225
/// match lock.try_read() {
226
226
/// Ok(n) => assert_eq!(*n, 1),
227
- /// Err(_) => unsafe { ::core::hint::unreachable_unchecked() } ,
227
+ /// Err(_) => unreachable!() ,
228
228
/// };
229
229
/// ```
230
230
#[ inline]
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ pub struct Guard {
82
82
/// }).join();
83
83
///
84
84
/// match mutex.lock() {
85
- /// Ok(_) => unsafe { ::core::hint::unreachable_unchecked() } ,
85
+ /// Ok(_) => unreachable!() ,
86
86
/// Err(p_err) => {
87
87
/// let data = p_err.get_ref();
88
88
/// println!("recovered: {}", data);
You can’t perform that action at this time.
0 commit comments