XO0165: syntax that is not a pattern
Where a pattern is expected (a match arm, let, if let, for, or after is), the parser found something that is not one: an operator, a missing pattern after let, or a non literal in a range pattern. A pattern after is tests without binding, so it may not bind names: write _, or bind with if let or match. See core 3.5 for the pattern table.
Example
fn f(r: Result[Int, Str]) -> Bool {
r is Ok(v)
}Fix
fn f(r: Result[Int, Str]) -> Bool {
r is Ok(_)
}Run xo explain XO0165 for this text in a terminal, or see
section 10.6 of the specification.