rust/tests/ui/try-block/try-block-catch.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
197 B
Rust
Raw Normal View History

//@ compile-flags: --edition 2018
#![feature(try_blocks)]
fn main() {
2019-04-10 12:41:47 -05:00
let res: Option<bool> = try {
true
2019-04-10 16:39:51 -05:00
} catch { };
2019-04-10 21:22:43 -05:00
//~^ ERROR keyword `catch` cannot follow a `try` block
}