]> git.lizzy.rs Git - rust.git/blob - src/test/ui/try-block/try-block-in-return.rs
Rollup merge of #99479 - Enselic:import-can-be-without-id, r=camelid
[rust.git] / src / test / ui / try-block / try-block-in-return.rs
1 // run-pass
2 // compile-flags: --edition 2018
3
4 #![feature(try_blocks)]
5
6 fn issue_76271() -> Option<i32> {
7     return try { 4 }
8 }
9
10 fn main() {
11     assert_eq!(issue_76271(), Some(4));
12 }