Skip to content

Commit 360012f

Browse files
committed
Amend language regarding the never type
1 parent e2caab1 commit 360012f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/std/src/keyword_docs.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2415,8 +2415,7 @@ mod while_keyword {}
24152415
/// a return from the parent function; rather, they cause the `Future` returned by the block to
24162416
/// return with that value.
24172417
///
2418-
/// For example, the following Rust function will return `5`, assigning the `!` value to `x`, which
2419-
/// goes unused:
2418+
/// For example, the following Rust function will return `5`, causing `x` to take the [`!` type][never type]:
24202419
/// ```rust
24212420
/// #[expect(unused_variables)]
24222421
/// fn example() -> i32 {
@@ -2455,6 +2454,7 @@ mod while_keyword {}
24552454
/// [async book]: https://rust-lang.github.io/async-book/
24562455
/// [`return`]: ../std/keyword.return.html
24572456
/// [try operator]: ../reference/expressions/operator-expr.html#r-expr.try
2457+
/// [never type]: ../reference/types/never.html
24582458
/// [`Result`]: result::Result
24592459
/// [async book blocks]: https://rust-lang.github.io/async-book/part-guide/more-async-await.html#async-blocks
24602460
mod async_keyword {}

0 commit comments

Comments
 (0)