summaryrefslogtreecommitdiffstats
path: root/src/test/ui/let-else/issue-100103.rs
blob: f5f9b2f5f0634b59f3ef41cc605b3b392d5fe752 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// edition:2021
// check-pass

#![feature(try_blocks)]


fn main() {
    let _: Result<i32, i32> = try {
        let Some(x) = Some(0) else {
            Err(1)?
        };

        x
    };
}