mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
17 lines
401 B
Rust
17 lines
401 B
Rust
// 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
|
|
};
|
|
}
|