title: How to quiet a warning for a single statement in Rust?
body: <p>Say there is a single warning such as <code>path_statements</code>, <code>unused_variables</code>. Is there a way to ignore a single instant of this, without isolating them into a code block or function?</p>
  
  <p>To be clear, when there is a single warning in the code. I would like the ability to quiet only that warning, without having to do special changes addressing the particular warning.
  And without this quieting warnings anywhere else, even later on in the same function.</p>
  
  <p>With GCC this can be done as follows:</p>
  
  <pre><code>#pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wformat"
      /* Isolated region which doesn't raise warnings! */
      this_would_raise_Wformat(args);
  #pragma GCC diagnostic pop
  </code></pre>
  
  <p>Does Rust have the equivalent capability?</p>
  
  <hr>
  
  <p>Note, am asking about the general case of how to quiet warnings.
  Am aware there are ways to resolve unused var warning for eg.</p>