Does this compile? If it does, what does it print?
fn pick(x: &str, y: &str) -> &str {
if x.len() >= y.len() { x } else { y }
}
fn main() {
let a = String::from("rust");
let b = String::from("go");
println!("{}", pick(&a, &b));
}The compiler says:
error[E0106]: missing lifetime specifier