trpl-zh-cn/listings/ch04-understanding-ownership/no-listing-03-string-move/src/main.rs

7 lines
111 B
Rust
Raw Normal View History

2022-02-06 16:43:51 +08:00
fn main() {
// ANCHOR: here
let s1 = String::from("hello");
let s2 = s1;
// ANCHOR_END: here
}