rust/rustfmt-core/tests/source/catch.rs
2018-02-07 22:48:05 +09:00

28 lines
374 B
Rust

#![feature(catch_expr)]
fn main() {
let x = do catch {
foo()?
};
let x = do catch /* Invisible comment */ { foo()? };
let x = do catch {
unsafe { foo()? }
};
let y = match (do catch {
foo()?
}) {
_ => (),
};
do catch {
foo()?;
};
do catch {
// Regular do catch block
};
}