E0057

E0057#

Warning name: missing_pattern_payload

Constructor pattern expect payload.

The warning is emitted when the payload part is missing from the constructor pattern.

Erroneous example#

///|
pub fn[T] is_some(s : T?) -> Bool {
  match s {
    Some => true
    None => false
  }
}

Suggestion#

Use (_) to ignore all the payloads.

///|
pub fn[T] is_some(s : T?) -> Bool {
  match s {
    Some(_) => true
    None => false
  }
}