title: Bitwise or in match?
body: <p>I have a variable that consists of several flags ORed together, and I'd like to test which combination of them my value is and act on that. Unfortunately, the <code>|</code> operator has a different meaning in a <code>match</code> statement, so I can't write</p>
  
  <pre><code>match x {
      (FLAG1 | FLAG2) =&gt; return 5;
      (FLAG1 | FLAG3) =&gt; return 6;
      (FLAG2 | FLAG3) =&gt; return y;
      _ =&gt; return 0;
  }
  </code></pre>
  
  <p>and instead I need to precompute <code>(FLAG1 | FLAG2)</code> and so on, making my code ugly and unreadable. Is there a better way to do this?</p>