Skip to main content

E0057: Refutable Pattern in let Binding

A let binding without an else block must match every possible value of the initializer's type. A literal or a single enum variant can fail to match.

Add a diverging else block to handle the unmatched case, or use an irrefutable pattern such as a binding, wildcard, struct, or tuple whose nested patterns are also irrefutable.

let Result::Ok(value) = result else { return; };