1 error[E0507]: cannot move out of borrowed content
2 --> $DIR/issue-51415.rs:16:42
4 LL | let opt = a.iter().enumerate().find(|(_, &s)| {
8 | cannot move out of borrowed content
10 note: move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait
11 --> $DIR/issue-51415.rs:16:47
13 LL | let opt = a.iter().enumerate().find(|(_, &s)| {
16 error[E0507]: cannot move out of data in a `&` reference
17 --> $DIR/issue-51415.rs:16:47
19 LL | let opt = a.iter().enumerate().find(|(_, &s)| {
22 | cannot move out of data in a `&` reference
25 error: aborting due to 2 previous errors
27 For more information about this error, try `rustc --explain E0507`.