error[E0599]: no associated item named `String` found for type `std::string::String` in the current scope --> $DIR/issue-42880.rs:4:15 | LL | let f = |&Value::String(_)| (); //~ ERROR no associated item named | ^^^^^^^^^^^^^^^^ associated item not found in `std::string::String` error: aborting due to previous error For more information about this error, try `rustc --explain E0599`.