2019-04-10 12:35:48 -05:00
|
|
|
//@ 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
|
2019-04-10 12:35:48 -05:00
|
|
|
}
|