]> git.lizzy.rs Git - rust.git/blob - tests/target/catch.rs
Merge pull request #1640 from topecongiro/issue-1632
[rust.git] / tests / target / catch.rs
1 #![feature(catch_expr)]
2
3 fn main() {
4     let x = do catch { foo()? };
5
6     let x = do catch /* Invisible comment */ { foo()? };
7
8     let x = do catch { unsafe { foo()? } };
9
10     let y = match (do catch { foo()? }) {
11         _ => (),
12     };
13
14     do catch {
15         foo()?;
16     };
17
18     do catch {
19         // Regular do catch block
20     };
21 }