rust/tests/ui/try-block/try-block-in-return.rs
2023-01-11 09:32:08 +00:00

13 lines
183 B
Rust

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