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