1 // Regression test for #51415: match default bindings were failing to
2 // see the "move out" implied by `&s` below.
5 let a = vec![String::from("a")];
6 let opt = a.iter().enumerate().find(|(_, &s)| {
7 //~^ ERROR cannot move out
8 *s == String::from("d")
10 println!("{:?}", opt);