summaryrefslogtreecommitdiffstats
path: root/tests/ui/let-else/issue-94176.rs
blob: f76dfc15bc15d7ebf6a05b690e43acb632501062 (plain)
1
2
3
4
5
6
7
8
9
10
// Issue #94176: wrong span for the error message of a mismatched type error,
// if the function uses a `let else` construct.


pub fn test(a: Option<u32>) -> Option<u32> { //~ ERROR mismatched types
    let Some(_) = a else { return None; };
    println!("Foo");
}

fn main() {}