summaryrefslogtreecommitdiffstats
path: root/tests/ui/typeck/issue-89856.rs
blob: b021e349e358c1f9ac83745c8d1ce2b014e0a34d (plain)
1
2
3
4
5
6
7
8
fn take_str_maybe(x: Option<&str>) -> Option<&str> { None }

fn main() {
    let string = String::from("Hello, world");
    let option = Some(&string);
    take_str_maybe(option);
    //~^ ERROR: mismatched types [E0308]
}