summaryrefslogtreecommitdiffstats
path: root/src/test/ui/let-else/let-else-non-diverging.rs
blob: b5bd91ceb9e755237bdce693aaa35a90727d5076 (plain)
1
2
3
4
5
6
7
8
9
10
11
fn main() {
    let Some(x) = Some(1) else { //~ ERROR does not diverge
        Some(2)
    };
    let Some(x) = Some(1) else { //~ ERROR does not diverge
        if 1 == 1 {
            panic!();
        }
    };
    let Some(x) = Some(1) else { Some(2) }; //~ ERROR does not diverge
}