summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-100605.rs
blob: 917a45c15bbc81a1ee6d19122d9e0bbf57549add (plain)
1
2
3
4
5
6
7
8
9
fn takes_option(_arg: Option<&String>) {}

fn main() {
    takes_option(&None); //~ ERROR 4:18: 4:23: mismatched types [E0308]

    let x = String::from("x");
    let res = Some(x);
    takes_option(&res); //~ ERROR 8:18: 8:22: mismatched types [E0308]
}