From 84096e05304794138098395a230028756f9f3b83 Mon Sep 17 00:00:00 2001 From: Unreachable Date: Fri, 5 Apr 2019 03:05:33 +0000 Subject: improve docs for std::hint::unreachable_unchecked() --- src/libcore/hint.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/libcore') diff --git a/src/libcore/hint.rs b/src/libcore/hint.rs index d43e6c49f4c..cd4962d30df 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 /// -- cgit 1.4.1-3-g733a5 From 62a7bfd1ba299f451421306cb3705d697619359a Mon Sep 17 00:00:00 2001 From: Unreachable Date: Fri, 5 Apr 2019 17:42:09 +0000 Subject: Remove parens --- src/libcore/hint.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libcore') diff --git a/src/libcore/hint.rs b/src/libcore/hint.rs index cd4962d30df..89bf3640968 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 /// -- cgit 1.4.1-3-g733a5