1 2 3 4 5 6
fn main() { let x = String::new(); foo(x.clone()); //~ ERROR mismatched types } fn foo(_: &str) {}