summaryrefslogtreecommitdiffstats
path: root/src/test/ui/try-block/try-block-in-return.rs
blob: a15bfeef1c12d49b07d50a85983ac586042e8e57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// run-pass
// compile-flags: --edition 2018

#![feature(try_blocks)]

fn issue_76271() -> Option<i32> {
    return try { 4 }
}

fn main() {
    assert_eq!(issue_76271(), Some(4));
}