]> git.lizzy.rs Git - rust.git/blob - src/tools/rustfmt/tests/target/catch.rs
Merge commit '05677b6bd6c938ed760835d9b1f6514992654ae3' into sync_cg_clif-2021-08-06
[rust.git] / src / tools / rustfmt / tests / target / catch.rs
1 // rustfmt-edition: 2018
2 #![feature(try_blocks)]
3
4 fn main() {
5     let x = try { foo()? };
6
7     let x = try /* Invisible comment */ { foo()? };
8
9     let x = try { unsafe { foo()? } };
10
11     let y = match (try { foo()? }) {
12         _ => (),
13     };
14
15     try {
16         foo()?;
17     };
18
19     try {
20         // Regular try block
21     };
22 }