Sign in
rust
/
rust-by-example
/
refs/heads/revert-1282-master
/
.
/
src
/
scope.md
blob: ac7013278133e2ab59939adc7604dc4bf20e43eb [
file
] [
log
] [
blame
] [
view
] [
edit
]
# 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
.