Sign in
rust
/
rust-by-example
/
8a63d8bb8d620554ae0cb019d6494d8f7db13f92
/
.
/
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
.