mirror of
https://github.com/KaiserY/trpl-zh-cn
synced 2025-05-02 11:18:14 +08:00
11 lines
302 B
Rust
11 lines
302 B
Rust
|
fn main() {
|
||
|
// ANCHOR: here
|
||
|
{
|
||
|
let s = String::from("hello"); // s is valid from this point forward
|
||
|
|
||
|
// do stuff with s
|
||
|
} // this scope is now over, and s is no
|
||
|
// longer valid
|
||
|
// ANCHOR_END: here
|
||
|
}
|