title: Rust doesn't see my overloaded f64 multiplication operator
body: <p>I'm implementing a simple matrix library in rust and I'm currently writing the operator for scalar multiplication. Right-multiplication works:</p>
  
  <pre><code>impl&lt;T: Num + Zero + Clone + Float&gt; Mul&lt;T, Mat&lt;T&gt;&gt; for Mat&lt;T&gt; {
      fn mul(&amp;self, rhs: &amp;T) -&gt; Mat&lt;T&gt; {
          self.componentwise(|v| v.clone() * *rhs)
      }
  }
  </code></pre>
  
  <p>But I can't seem to do left-multiplication, I assumed the following code would do what I want:</p>
  
  <pre><code>impl&lt;T: Num + Zero + Clone + Float&gt; Mul&lt;Mat&lt;T&gt;, Mat&lt;T&gt;&gt; for T {
      fn mul(&amp;self, rhs: &amp;Mat&lt;T&gt;) -&gt; Mat&lt;T&gt; {
          rhs.componentwise(|v| *self * v.clone())
      }
  }
  </code></pre>
  
  <p>But the following doesn't work:</p>
  
  <pre><code>let A = mat![[1f64, 2., 3.], [4., 5., 6.]];
  let P = A * 4f64; // works!
  let Q = 4f64 * A; // error...
  </code></pre>
  
  <p>The error is <code>error: mismatched types: expected `f64`, found `linalg::Mat&lt;f64&gt;` (expected f64, found struct linalg::Mat)</code>. Can I only have f64 * f64 multiplication, or am I approaching the second case wrong? I tried implementing it for f64 specifically with <code>impl Mul&lt;Mat&lt;f64&gt;, Mat&lt;f64&gt;&gt; for f64</code>, but that still doesn't work.</p>
  
  <p>I found that I could make it work using <code>4f64.mul(&amp;A)</code>, but that is not ideal.</p>