Skip to content

Commit d557f4a

Browse files
committed
Rollup merge of rust-lang#28485 - Wallacoloo:clarify-let-lhs, r=alexcrichton
In code like `let x = 5`, I am initially confused as to the meaning of "let doesn't take a name on the left hand side, it actually accepts a pattern." - I interpret that as the pattern being located as: `<pattern> let [...]`. I think what is meant is that the name/pattern is on the left hand side *of the assignment*, rather than to the left of the *let* statement. This change clarifies that.
2 parents 00d64d6 + cbc9517 commit d557f4a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/doc/trpl/guessing-game.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ a few tricks up their sleeves.
147147

148148
For example, they’re [immutable][immutable] by default. That’s why our example
149149
uses `mut`: it makes a binding mutable, rather than immutable. `let` doesn’t
150-
take a name on the left hand side, it actually accepts a
150+
take a name on the left hand side of the assignment, it actually accepts a
151151
[pattern][patterns]’. We’ll use patterns later. It’s easy enough
152152
to use for now:
153153

0 commit comments

Comments
 (0)