Ah yes I forgot to write the &quot;in var&#x2F;let&quot; part which was supposed to be there.<p>That is you can only use refutable patterns in `switch` (and `if let`&#x2F;`while let` though I believe those are still restricted to Option, not general-purpose as in Rust, that correct?). In Erlang you can use a refutable match in an &quot;assignment&quot;, that&#x27;s basically a pattern assertion, a more general-purpose version of Swift&#x27;s forced unwrapping.