about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCamelid <37223377+camelid@users.noreply.github.com>2020-08-30 11:43:16 -0700
committerGitHub <noreply@github.com>2020-08-30 11:43:16 -0700
commit37ea97cc10212711411e6dbb6b260e668b7ac2b5 (patch)
tree423541abcba5b35f56b63de2a58082372306b7fc
parent7e2548fe69ff5ec4e5e06c8c28351cbf2ebf7eee (diff)
downloadrust-37ea97cc10212711411e6dbb6b260e668b7ac2b5.tar.gz
rust-37ea97cc10212711411e6dbb6b260e668b7ac2b5.zip
Explain why the `0` is a `u32`
-rw-r--r--library/std/src/primitive_docs.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/library/std/src/primitive_docs.rs b/library/std/src/primitive_docs.rs
index 0a0aa6785ed..79621d46f0e 100644
--- a/library/std/src/primitive_docs.rs
+++ b/library/std/src/primitive_docs.rs
@@ -222,8 +222,9 @@ mod prim_bool {}
 ///
 /// The reason is that, in the first example, there are many possible types that `!` could coerce
 /// to, because the function can return one of many concrete types. However, in the second example,
-/// the `else` branch returns a `0` of type `u32`, which is a concrete type that `!` can be coerced
-/// to. See issue [#36375] for more information on this quirk of `!`.
+/// the `else` branch returns a `0`, which the compiler infers from the return type to be of type
+/// `u32`, which is a concrete type that `!` can be coerced to. See issue [#36375] for more
+/// information on this quirk of `!`.
 ///
 /// [#36375]: https://github.com/rust-lang/rust/issues/36375
 ///