error[E0308]: mismatched types --> $DIR/issue-89856.rs:6:20 | LL | take_str_maybe(option); | ^^^^^^ expected `str`, found struct `String` | = note: expected enum `Option<&str>` found enum `Option<&String>` help: try converting the passed type into a `&str` | LL | take_str_maybe(option.map(|x| &**x)); | ++++++++++++++ error: aborting due to previous error For more information about this error, try `rustc --explain E0308`.