Sign in
rust
/
rust-by-example
/
e6c8e5d2cde849c2a657efde504a3feede70fcfa
/
.
/
src
/
scope.md
blob: 47bf5a146e2dae0e744b791e22010118dfa29b36 [
file
] [
log
] [
blame
] [
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
.