You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While I have occasionally wanted this sort of conciseness, I don't think it's worth special-casing single-name patterns. It's best if, as much as possible, let $pat is equivalent to all other cases of pattern matching, and thus let x should be, as much as possible, just binding the entire thing and not enable any special syntactic powers for the rest of the statement.
Rust has:
let PATTERN: TYPE = EXPRESSION else DIVERGING_BLOCK;
but it should allow:
let PATTERN: TYPE = EXPRESSION else CONVERGING_BLOCK;
if
PATTERN
contains a single named variable. e.g.=>
The text was updated successfully, but these errors were encountered: