about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCamelid <37223377+camelid@users.noreply.github.com>2020-08-29 20:41:36 -0700
committerGitHub <noreply@github.com>2020-08-29 20:41:36 -0700
commit0d9a2abe698e84c8b3c473659db321606d7d5c02 (patch)
tree1e17d02dab34b1b52e0faf8a4862f4e40e917c51
parentfd985e29dd97f053f31a2e282fb59363f6b6db3f (diff)
downloadrust-0d9a2abe698e84c8b3c473659db321606d7d5c02.tar.gz
rust-0d9a2abe698e84c8b3c473659db321606d7d5c02.zip
It's only an issue without an `impl Trait for !`
-rw-r--r--library/std/src/primitive_docs.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/library/std/src/primitive_docs.rs b/library/std/src/primitive_docs.rs
index a577a0a51c9..df64287bc7d 100644
--- a/library/std/src/primitive_docs.rs
+++ b/library/std/src/primitive_docs.rs
@@ -194,9 +194,9 @@ mod prim_bool {}
 /// # `!` and traits
 ///
 /// When writing your own traits, `!` should have an `impl` whenever there is an obvious `impl`
-/// which doesn't `panic!`. The reason is that functions returning an `impl Trait` cannot diverge,
-/// i.e., returning `!`, as their only possible code path. As an example, this code doesn't
-/// compile:
+/// which doesn't `panic!`. The reason is that functions returning an `impl Trait` where `!`
+/// does not have an `impl` of `Trait` cannot diverge as their only possible code path. In other
+/// words, they can't return `!` from every code path. As an example, this code doesn't compile:
 ///
 /// ```compile_fail
 /// use core::ops::Add;
@@ -206,7 +206,7 @@ mod prim_bool {}
 /// }
 /// ```
 ///
-/// While this code does:
+/// But this code does:
 ///
 /// ```
 /// use core::ops::Add;