From 84096e05304794138098395a230028756f9f3b83 Mon Sep 17 00:00:00 2001 From: Unreachable Date: Fri, 5 Apr 2019 03:05:33 +0000 Subject: [PATCH 1/2] improve docs for std::hint::unreachable_unchecked() --- src/libcore/hint.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/libcore/hint.rs b/src/libcore/hint.rs index d43e6c49f4c99..cd4962d30df11 100644 --- a/src/libcore/hint.rs +++ b/src/libcore/hint.rs @@ -21,9 +21,8 @@ use intrinsics; /// difficult-to-debug problems. /// /// Use this function only when you can prove that the code will never call it. -/// -/// The [`unreachable!()`] macro is the safe counterpart of this function, which -/// will panic instead when executed. +/// Otherwise, consider using the [`unreachable!()`] macro, which does not allow +/// optimizations but will panic when executed. /// /// [`unreachable!()`]: ../macro.unreachable.html /// From 62a7bfd1ba299f451421306cb3705d697619359a Mon Sep 17 00:00:00 2001 From: Unreachable Date: Fri, 5 Apr 2019 17:42:09 +0000 Subject: [PATCH 2/2] Remove parens --- src/libcore/hint.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libcore/hint.rs b/src/libcore/hint.rs index cd4962d30df11..89bf364096896 100644 --- a/src/libcore/hint.rs +++ b/src/libcore/hint.rs @@ -21,10 +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 +/// Otherwise, consider using the [`unreachable!`] macro, which does not allow /// optimizations but will panic when executed. /// -/// [`unreachable!()`]: ../macro.unreachable.html +/// [`unreachable!`]: ../macro.unreachable.html /// /// # Example ///