Auto merge of #39923 - mattyw:patch-1, r=steveklabnik
Variable Bindings possible nitpick Complete drive by nitpick I'm afraid
This commit is contained in:
commit
941d494a6a
1 changed files with 1 additions and 1 deletions
|
|
@ -181,7 +181,7 @@ print.
|
|||
# Scope and shadowing
|
||||
|
||||
Let’s get back to bindings. Variable bindings have a scope - they are
|
||||
constrained to live in a block they were defined in. A block is a collection
|
||||
constrained to live in the block they were defined in. A block is a collection
|
||||
of statements enclosed by `{` and `}`. Function definitions are also blocks!
|
||||
In the following example we define two variable bindings, `x` and `y`, which
|
||||
live in different blocks. `x` can be accessed from inside the `fn main() {}`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue