Rellum Rellum

S0146: tuple pattern does not match scrutinee

Generated from rellum-diagnostics/src/db.rs.

Explanation

Tuple patterns can only destructure tuple values with the same number of fields. Each element pattern is checked against the corresponding tuple field type.

Common causes

Canonical fixes

Before:

match pair { (a, b, c) => a }

After:

match pair { (a, b) => a }

Before:

match value { () => 0 }

After:

match value { _ => 0 }

Code example

match pair { (a, b, c) => a }