fn main() { let mut s = String::from("hello"); let r1 = &s; let r2 = &s; // let r3 = &mut s; // 错误:不能在有不可变引用时创建可变引用 println!("{} and {}", r1, r2); }