]> git.proxmox.com Git - rustc.git/blame - src/tools/rustfmt/tests/source/catch.rs
Update upstream source from tag 'upstream/1.52.1+dfsg1'
[rustc.git] / src / tools / rustfmt / tests / source / catch.rs
CommitLineData
f20569fa
XL
1// rustfmt-edition: 2018
2#![feature(try_blocks)]
3
4fn main() {
5 let x = try {
6 foo()?
7 };
8
9 let x = try /* Invisible comment */ { foo()? };
10
11 let x = try {
12 unsafe { foo()? }
13 };
14
15 let y = match (try {
16 foo()?
17 }) {
18 _ => (),
19 };
20
21 try {
22 foo()?;
23 };
24
25 try {
26 // Regular try block
27 };
28}