title: What is the preferred way of matching a variable with a pattern guard that doesn't use the matched value?
body: <p>Between the two snippets below, which is the better / preferred one?</p>
  
  <pre class="lang-rust prettyprint-override"><code>fn main() {
      let pair = 7;
  
      match pair {
          pair if pair &gt; 5 =&gt; println!("Yeah"),
          _ =&gt; println!("No"),
      }
  }
  </code></pre>
  
  <pre class="lang-rust prettyprint-override"><code>fn main() {
      let pair = 7;
  
      match pair {
          _ if pair &gt; 5 =&gt; println!("Yeah"),
          _ =&gt; println!("No"),
      }
  }
  </code></pre>
  
  <p>And is there a better way to write this? Because this doesn't work:</p>
  
  <pre class="lang-rust prettyprint-override"><code>fn main() {
      let pair = 7;
  
      match pair {
          &gt; 5 =&gt; println!("Yeah"),
          _ =&gt; println!("No"),
      }
  }
  </code></pre>