Sign in
rust
/
rust-by-example
/
b690a0d682cd2148cda61bf648c1605061d4c765
/
.
/
src
/
scope.md
blob: 47bf5a146e2dae0e744b791e22010118dfa29b36 [
file
] [
view
]
# Scoping rules
Scopes
play an important part
in
ownership
,
borrowing
,
and
lifetimes
.
That
is
,
they indicate to the compiler
when
borrows are valid
,
when
resources can be freed
,
and
when
variables are created
or
destroyed
.