mirror of
https://github.com/KaiserY/trpl-zh-cn
synced 2025-04-30 18:28:15 +08:00
10 lines
126 B
Rust
10 lines
126 B
Rust
|
fn main() {
|
||
|
let reference_to_nothing = dangle();
|
||
|
}
|
||
|
|
||
|
fn dangle() -> &String {
|
||
|
let s = String::from("hello");
|
||
|
|
||
|
&s
|
||
|
}
|