trpl-zh-cn/listings/ch04-understanding-ownership/no-listing-10-multiple-mut-not-allowed/src/main.rs
2022-02-06 16:43:51 +08:00

11 lines
173 B
Rust
Executable File

fn main() {
// ANCHOR: here
let mut s = String::from("hello");
let r1 = &mut s;
let r2 = &mut s;
println!("{}, {}", r1, r2);
// ANCHOR_END: here
}