about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLynnesbian <lynne@bune.city>2025-05-02 13:22:05 +1000
committerLynnesbian <lynne@bune.city>2025-05-02 13:22:05 +1000
commit360012f41a7521f8a1bd488f015b5342e989aab8 (patch)
tree10701fb4f35fd81283079cdff38db1bc4e4bb5fb
parente2caab1822d858de4525ae615002094ab6e06734 (diff)
downloadrust-360012f41a7521f8a1bd488f015b5342e989aab8.tar.gz
rust-360012f41a7521f8a1bd488f015b5342e989aab8.zip
Amend language regarding the never type
-rw-r--r--library/std/src/keyword_docs.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/keyword_docs.rs b/library/std/src/keyword_docs.rs
index b8eb0fd104c..b6a9ba01290 100644
--- a/library/std/src/keyword_docs.rs
+++ b/library/std/src/keyword_docs.rs
@@ -2415,8 +2415,7 @@ mod while_keyword {}
 /// a return from the parent function; rather, they cause the `Future` returned by the block to
 /// return with that value.
 ///
-/// For example, the following Rust function will return `5`, assigning the `!` value to `x`, which
-/// goes unused:
+/// For example, the following Rust function will return `5`, causing `x` to take the [`!` type][never type]:
 /// ```rust
 /// #[expect(unused_variables)]
 /// fn example() -> i32 {
@@ -2455,6 +2454,7 @@ mod while_keyword {}
 /// [async book]: https://rust-lang.github.io/async-book/
 /// [`return`]: ../std/keyword.return.html
 /// [try operator]: ../reference/expressions/operator-expr.html#r-expr.try
+/// [never type]: ../reference/types/never.html
 /// [`Result`]: result::Result
 /// [async book blocks]: https://rust-lang.github.io/async-book/part-guide/more-async-await.html#async-blocks
 mod async_keyword {}