rust/tests/ui/parser/do-catch-suggests-try.rs

11 lines
293 B
Rust
Raw Normal View History

2019-12-03 12:35:05 +00:00
#![feature(try_blocks)]
fn main() {
let _: Option<()> = do catch {};
//~^ ERROR found removed `do catch` syntax
2019-12-03 12:35:05 +00:00
//~| replace with the new syntax
//~| following RFC #2388, the new non-placeholder syntax is `try`
let _recovery_witness: () = 1; //~ ERROR mismatched types
}