title: Why does a trailing comma prevent this macro from compiling?
body: <p>I am trying to learn macros, to that effect I made this example:</p>
  <pre class="lang-rust prettyprint-override"><code>macro_rules! Reflect
  {
  ($name:ident {$($field_name:ident : $field_type:ty), *}) =&gt;
  {
    
      struct $name
      {
          $($field_name : $field_type), *
   
      }
   
  };
  }
  
  Reflect!(
      Test
      {
          field : usize,
          field2 : usize,
      }
  );
  </code></pre>
  <p>This exact syntax generates:</p>
  <pre><code>    |
  183 | macro_rules! Reflect
      | -------------------- when calling this macro
  ...
  202 |     }
      |     ^ no rules expected this token in macro call
  </code></pre>
  <p>But if I take out the last coma after <code>field2</code> I can compile no problem. That makes no sense to me, the matching pattern has a comma at the end, why is it not always looking for a trailing comma?</p>