title: Why do we call the vec macro using square brackets instead of the parenthesis it is defined with?
body: <p>I am learning Rust macros and am confused about the syntax while using <code>vec</code>. The <a href="https://github.com/rust-lang/rust/blob/1.35.0/src/liballoc/macros.rs#L38-L46" rel="noreferrer">source code</a> implementing <code>vec!</code>:</p>
  
  <pre class="lang-rust prettyprint-override"><code>macro_rules! vec {
      ($elem:expr; $n:expr) =&gt; (
          $crate::vec::from_elem($elem, $n)
      );
      ($($x:expr),*) =&gt; (
          &lt;[_]&gt;::into_vec(box [$($x),*])
      );
      ($($x:expr,)*) =&gt; (vec![$($x),*])
  }
  </code></pre>
  
  <p>Let's forget the standard way to use it:</p>
  
  <pre class="lang-rust prettyprint-override"><code>let v0 = vec![1, 2, 3];
  </code></pre>
  
  <p>If we look at the source code, shouldn't we use it like below?</p>
  
  <pre class="lang-rust prettyprint-override"><code>let v1 = vec!(3; 1);
  let v2 = vec!(1, 2, 3); 
  </code></pre>
  
  <p>Why do we use <code>[]</code> instead of <code>()</code> in <code>v1</code> and <code>v2</code> compared to <code>v0</code>?</p>