Rellum Rellum

S0051: duplicate field in pattern

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

Explanation

A record or enum payload field can only be bound once in a pattern. Binding the same field twice would create two local names for the same payload slot and make later field checks ambiguous.

Common causes

Canonical fixes

Before:

Point { x, x }

After:

Point { x }

Before:

Point { x, x }

After:

Point { x, y }

Code example

Point { x, x }