Skip to content

Commit d9422f0

Browse files
authored
Rollup merge of #59717 - Reconcyl:master, r=steveklabnik
improve docs for std::hint::unreachable_unchecked() Fixes #59549
2 parents 2975a3c + 62a7bfd commit d9422f0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/libcore/hint.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,10 @@ use intrinsics;
2121
/// difficult-to-debug problems.
2222
///
2323
/// Use this function only when you can prove that the code will never call it.
24+
/// Otherwise, consider using the [`unreachable!`] macro, which does not allow
25+
/// optimizations but will panic when executed.
2426
///
25-
/// The [`unreachable!()`] macro is the safe counterpart of this function, which
26-
/// will panic instead when executed.
27-
///
28-
/// [`unreachable!()`]: ../macro.unreachable.html
27+
/// [`unreachable!`]: ../macro.unreachable.html
2928
///
3029
/// # Example
3130
///

0 commit comments

Comments
 (0)