rust/rustfmt-core/tests/target/catch.rs

22 lines
338 B
Rust
Raw Normal View History

2017-05-12 17:28:48 -05:00
#![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
};
}