Skip to content

Commit 37ea97c

Browse files
authored
Explain why the 0 is a u32
1 parent 7e2548f commit 37ea97c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

library/std/src/primitive_docs.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,9 @@ mod prim_bool {}
222222
///
223223
/// The reason is that, in the first example, there are many possible types that `!` could coerce
224224
/// to, because the function can return one of many concrete types. However, in the second example,
225-
/// the `else` branch returns a `0` of type `u32`, which is a concrete type that `!` can be coerced
226-
/// to. See issue [#36375] for more information on this quirk of `!`.
225+
/// the `else` branch returns a `0`, which the compiler infers from the return type to be of type
226+
/// `u32`, which is a concrete type that `!` can be coerced to. See issue [#36375] for more
227+
/// information on this quirk of `!`.
227228
///
228229
/// [#36375]: https://github.com/rust-lang/rust/issues/36375
229230
///

0 commit comments

Comments
 (0)