Skip to content

Commit 79244c3

Browse files
committed
let introduces a statement
I changes *expression* to *statement* to make more accurate, because in Rust, `let` introduces a declaration statement.
1 parent abb1515 commit 79244c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/doc/book/variable-bindings.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ function, rather than leaving it off. Otherwise, you’ll get an error.
1818

1919
In many languages, a variable binding would be called a *variable*, but Rust’s
2020
variable bindings have a few tricks up their sleeves. For example the
21-
left-hand side of a `let` expression is a ‘[pattern][pattern]’, not a
21+
left-hand side of a `let` statement is a ‘[pattern][pattern]’, not a
2222
variable name. This means we can do things like:
2323

2424
```rust
2525
let (x, y) = (1, 2);
2626
```
2727

28-
After this expression is evaluated, `x` will be one, and `y` will be two.
28+
After this statement is evaluated, `x` will be one, and `y` will be two.
2929
Patterns are really powerful, and have [their own section][pattern] in the
3030
book. We don’t need those features for now, so we’ll keep this in the back
3131
of our minds as we go forward.

0 commit comments

Comments
 (0)