rust/tests/ui/try-block/try-block-in-return.rs
2024-02-16 20:02:50 +00:00

13 lines
185 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));
}