summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/do-catch-suggests-try.rs
blob: f64568d06e96d00e3d7e6fe05e99d5b8e127ccb9 (plain)
1
2
3
4
5
6
7
8
9
10
#![feature(try_blocks)]

fn main() {
    let _: Option<()> = do catch {};
    //~^ ERROR found removed `do catch` syntax
    //~| replace with the new syntax
    //~| following RFC #2388, the new non-placeholder syntax is `try`

    let _recovery_witness: () = 1; //~ ERROR mismatched types
}