]> git.lizzy.rs Git - rust.git/blob - tests/source/catch.rs
Update tests
[rust.git] / tests / source / catch.rs
1 #![feature(catch_expr)]
2
3 fn main() {
4     let x = do catch {
5         foo()?
6     };
7
8     let x = do catch /* Invisible comment */ { foo()? };
9
10     let x = do catch {
11         unsafe { foo()? }
12     };
13
14     let y = match (do catch {
15         foo()?
16     }) {
17         _ => (),
18     };
19
20     do catch {
21         foo()?;
22     };
23
24     do catch {
25         // Regular do catch block
26     };
27 }