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

13 lines
339 B
Rust
Raw Normal View History

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