summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/issues/issue-89396.rs
blob: f1d9efa524f463e7bda131f9eba5fc6a3c73d5cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Regression test for issue #89396: Try to recover from a
// `=>` -> `=` or `->` typo in a match arm.

// run-rustfix

fn main() {
    let opt = Some(42);
    let _ = match opt {
        Some(_) = true,
        //~^ ERROR: expected one of
        //~| HELP: try using a fat arrow here
        None -> false,
        //~^ ERROR: expected one of
        //~| HELP: try using a fat arrow here
    };
}