mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-02 18:27:37 +00:00
13 lines
169 B
Rust
13 lines
169 B
Rust
//@ run-pass
|
|
//@ edition: 2018
|
|
|
|
#![feature(try_blocks)]
|
|
|
|
fn issue_76271() -> Option<i32> {
|
|
return try { 4 }
|
|
}
|
|
|
|
fn main() {
|
|
assert_eq!(issue_76271(), Some(4));
|
|
}
|