title: How to fix "warning: unused variable" for enum with named params in Rust?
body: <p>I have an enum like:</p>
  
  <pre><code>pub enum Tag&lt;'a&gt; {
      Container { c: Vec&lt;Tag&lt;'a&gt;&gt; },
      // ...
  }
  </code></pre>
  
  <p>when I try to match:</p>
  
  <pre><code>impl&lt;'a&gt; Display for Tag&lt;'a&gt; {
      fn fmt(&amp;self, f: &amp;mut Formatter) -&gt; fmt::Result {
          match *self {
              Tag::Container { ref c } =&gt; write!(f, "{}", "container"),
              // ...
          }
      }
  }
  </code></pre>
  
  <p>I get:</p>
  
  <pre class="lang-none prettyprint-override"><code>warning: unused variable: `c`, #[warn(unused_variables)] on by default
     |
  65 |             Tag::Container{ref c} =&gt; write!(f, "{}", "container"),
  </code></pre>
  
  <p>and in some other places.  </p>
  
  <p>I tried to use <code>_</code>, just to remove <code>ref c</code> but it all causes errors.  </p>