E0251

A constructor pattern with the wrong number of fields, such as Some or Shape.Square(a, b). Spans the pattern.

Machine-applicable fix: none.

Example

This program fails with E0251.

fn count(x: Option<Int>) -> Int {
    match x {
        Some => 1
        None => 0
    }
}

Fixed

The same program, fixed.

fn count(x: Option<Int>) -> Int {
    match x {
        Some(_) => 1
        None => 0
    }
}

Listed in the checker notes. oskac explain E0251 prints this entry offline.

All error codes