title: Why do I get the error "Expected type parameter, found integral variable"?
body: <p>I am getting familiar with Rust generics, but I can't figure out what's going wrong. </p>
  
  <pre><code>use std::collections::BTreeMap;
  
  fn frequency&lt;T: Ord + Clone&gt;(vec: &amp;Vec&lt;T&gt;) -&gt; BTreeMap&lt;T, u32&gt; {
      let mut movie_reviews = BTreeMap::new();
      let mut vec_ = Vec::new();
      vec.push(1);
      movie_reviews
  }
  </code></pre>
  
  <p>I have no clue why it expected type <code>T</code>:</p>
  
  <pre class="lang-none prettyprint-override"><code>error[E0308]: mismatched types
   --&gt; src/lib.rs:6:14
    |
  6 |     vec.push(1);
    |              ^ expected type parameter, found integral variable
    |
    = note: expected type `T`
               found type `{integer}`
  </code></pre>