diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-04-16 05:14:17 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-04-16 05:14:17 +0200 |
| commit | d9422f00a0f84c62b9232b485ef98585b0f5bc86 (patch) | |
| tree | 59b5d4f48c9f9ea789ce40d5258d653230f02274 /src/libcore | |
| parent | 2975a3c4befa8ad610da2e3c5f5de351d6d70a2b (diff) | |
| parent | 62a7bfd1ba299f451421306cb3705d697619359a (diff) | |
| download | rust-d9422f00a0f84c62b9232b485ef98585b0f5bc86.tar.gz rust-d9422f00a0f84c62b9232b485ef98585b0f5bc86.zip | |
Rollup merge of #59717 - Reconcyl:master, r=steveklabnik
improve docs for std::hint::unreachable_unchecked() Fixes #59549
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/hint.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libcore/hint.rs b/src/libcore/hint.rs index d43e6c49f4c..89bf3640968 100644 --- a/src/libcore/hint.rs +++ b/src/libcore/hint.rs @@ -21,11 +21,10 @@ use intrinsics; /// difficult-to-debug problems. /// /// Use this function only when you can prove that the code will never call it. +/// Otherwise, consider using the [`unreachable!`] macro, which does not allow +/// optimizations but will panic when executed. /// -/// The [`unreachable!()`] macro is the safe counterpart of this function, which -/// will panic instead when executed. -/// -/// [`unreachable!()`]: ../macro.unreachable.html +/// [`unreachable!`]: ../macro.unreachable.html /// /// # Example /// |
