mirror of https://github.com/KaiserY/trpl-zh-cn
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
302 B
11 lines
302 B
3 years ago
|
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
|
||
|
}
|