1 error[E0308]: mismatched types
2 --> $DIR/issue-89856.rs:6:20
4 LL | take_str_maybe(option);
5 | -------------- ^^^^^^ expected `str`, found struct `String`
7 | arguments to this function are incorrect
9 = note: expected enum `Option<&str>`
10 found enum `Option<&String>`
11 note: function defined here
12 --> $DIR/issue-89856.rs:1:4
14 LL | fn take_str_maybe(x: Option<&str>) -> Option<&str> { None }
15 | ^^^^^^^^^^^^^^ ---------------
16 help: try converting the passed type into a `&str`
18 LL | take_str_maybe(option.map(|x| &**x));
21 error: aborting due to previous error
23 For more information about this error, try `rustc --explain E0308`.