Skip to content

Commit bd968a1

Browse files
committed
Auto merge of #24554 - tshepang:let-faq, r=steveklabnik
2 parents 00978a9 + 4665c3b commit bd968a1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/doc/complement-design-faq.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,13 @@ particularly easy to read.
165165

166166
## Why is `let` used to introduce variables?
167167

168-
We don't use the term "variable", instead, we use "variable bindings". The
169-
simplest way for binding is the `let` syntax, other ways including `if let`,
170-
`while let` and `match`. Bindings also exist in function arguments positions.
168+
Instead of the term "variable", we use "variable bindings". The
169+
simplest way for creating a binding is by using the `let` syntax.
170+
Other ways include `if let`, `while let`, and `match`. Bindings also
171+
exist in function argument positions.
171172

172173
Bindings always happen in pattern matching positions, and it's also Rust's way
173-
to declare mutability. One can also redeclare mutability of a binding in
174+
to declare mutability. One can also re-declare mutability of a binding in
174175
pattern matching. This is useful to avoid unnecessary `mut` annotations. An
175176
interesting historical note is that Rust comes, syntactically, most closely
176177
from ML, which also uses `let` to introduce bindings.

0 commit comments

Comments
 (0)