2021-10-03 07:14:35 -05:00
|
|
|
// 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
|
2023-10-03 16:21:02 -05:00
|
|
|
//~| HELP: use a fat arrow to start a match arm
|
2021-10-03 07:14:35 -05:00
|
|
|
None => false,
|
|
|
|
//~^ ERROR: expected one of
|
2023-10-03 16:21:02 -05:00
|
|
|
//~| HELP: use a fat arrow to start a match arm
|
2021-10-03 07:14:35 -05:00
|
|
|
};
|
|
|
|
}
|