E0250
A pattern that names no variant or struct. Under ADR 0005 an uppercase name in a pattern is always a fieldless variant, never a binding, so a misspelled Nnoe is an error rather than a catch-all. Bare names are the prelude's variants (None, Some, Ok, Err); other variants are written Enum.Variant. Spans the name.
Machine-applicable fix: Replace the name with the single closest variant, qualified when it belongs to a user enum (Empty becomes Shape.Empty).
Example
This program fails with E0250.
fn count(x: Option<Int>) -> Int {
match x {
Some(n) => n
Nnoe => 0
}
}
Fixed
The same program, fixed.
fn count(x: Option<Int>) -> Int {
match x {
Some(n) => n
None => 0
}
}
Listed in the checker notes. oskac explain E0250 prints this entry offline.