LYR-PAR0034
a match arm without '=>'
A match arm's pattern, or its guard, is not followed by =>.
Explanation
A match arm is a pattern, an optional if guard, =>, and the arm's body.
Write => between the pattern and the body.
Wrong
fn main(): void {
let n = 1;
let s = match (n) {
1 "one",
_ => "many",
};
}
Right
fn main(): void {
let n = 1;
let s = match (n) {
1 => "one",
_ => "many",
};
let _ = s;
}