]> git.proxmox.com Git - rustc.git/blame - src/test/ui/parser/do-catch-suggests-try.rs
New upstream version 1.42.0+dfsg1
[rustc.git] / src / test / ui / parser / do-catch-suggests-try.rs
CommitLineData
dfeec247
XL
1#![feature(try_blocks)]
2
8faf50e0 3fn main() {
b7449926
XL
4 let _: Option<()> = do catch {};
5 //~^ ERROR found removed `do catch` syntax
dfeec247
XL
6 //~| replace with the new syntax
7 //~| following RFC #2388, the new non-placeholder syntax is `try`
8
9 let _recovery_witness: () = 1; //~ ERROR mismatched types
54a0048b 10}