rust/tests/ui/try-block/try-block-in-return.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
183 B
Rust
Raw Normal View History

// 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));
}