Fix E0505 by ensuring the value is not moved while a reference to it is still active. You must either clone the value before moving it or restructure the code so the reference is no longer needed when the move occurs.
fn main() {
let s = String::from("hello");
let r = &s; // Borrow s
let s2 = s.clone(); // Clone s instead of moving it
println!("{r}, {s2}");
}