summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/sugg-else-for-closure.fixed
blob: cf381d9da8be98cef2bdad6d69ca62713d24a95b (plain)
1
2
3
4
5
6
7
8
// run-rustfix

fn main() {
    let x = "com.example.app";
    let y: Option<&str> = None;
    let _s = y.unwrap_or_else(|| x.split('.').nth(1).unwrap());
    //~^ ERROR: mismatched types [E0308]
}