about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-04-05 18:47:48 +0200
committerGitHub <noreply@github.com>2020-04-05 18:47:48 +0200
commit4827aa6034636405778c63e1c95ac157dca14496 (patch)
tree5fcdb4d474ba4056f364d0e075c91d08206f6b85
parent2ec0e148f1848a483104f809412cfc0bef1d3c3f (diff)
parentbc26f5852124140c6a63306a24eb95962f92786b (diff)
downloadrust-4827aa6034636405778c63e1c95ac157dca14496.tar.gz
rust-4827aa6034636405778c63e1c95ac157dca14496.zip
Rollup merge of #70812 - rossmacarthur:fix/unit-called-nil, r=LukasKalbertodt
Do not use "nil" to refer to `()`

"nil" is not used in the [book](https://doc.rust-lang.org/book) or in the [standard library](https://doc.rust-lang.org/std) anywhere else. Because "nil" is often used in programming languages to refer to "None" or "null" I think it could be a little confusing for newcomers to see this type referred to as "nil".
-rw-r--r--src/libstd/primitive_docs.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/primitive_docs.rs b/src/libstd/primitive_docs.rs
index adad90f56d1..e0ceb9f3f38 100644
--- a/src/libstd/primitive_docs.rs
+++ b/src/libstd/primitive_docs.rs
@@ -320,7 +320,7 @@ mod prim_char {}
 
 #[doc(primitive = "unit")]
 //
-/// The `()` type, sometimes called "unit" or "nil".
+/// The `()` type, also called "unit".
 ///
 /// The `()` type has exactly one value `()`, and is used when there
 /// is no other meaningful value that could be returned. `()` is most