Sign in
◑
Theme
rust
/
rust-by-example
/
cf2015eb5402067b8a9c70c74c5a8e645bdc9f7a
/
.
/
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
.