title: Rust Diesel raw SQL gives error "type annotations needed for `std::result::Result<Vec<T>, diesel::result::Error>`"
body: <p>I am trying out simple raw SQL to MySQL using Diesel as shown in this example:</p>
  <p><a href="https://docs.diesel.rs/diesel/fn.sql_query.html" rel="nofollow noreferrer">https://docs.diesel.rs/diesel/fn.sql_query.html</a></p>
  <pre class="lang-rust prettyprint-override"><code>let users = sql_query(&quot;SELECT username FROM users&quot;).load(&amp;connection);
  </code></pre>
  <p>However this gives me an error message:</p>
  <pre class="lang-none prettyprint-override"><code>error[E0282]: type annotations needed for `std::result::Result&lt;Vec&lt;T&gt;, diesel::result::Error&gt;`
    --&gt; src/main.rs:53:57
     |
  53 |     let users = sql_query(&quot;SELECT username FROM users&quot;).load(&amp;connection);
     |         -----                                           ^^^^ cannot infer type for type parameter `U` declared on the associated function `load`
     |         |
     |         consider giving `users` the explicit type `std::result::Result&lt;Vec&lt;T&gt;, diesel::result::Error&gt;`, where the type parameter `U` is specified
  </code></pre>
  <p>Ps. I need to use raw sql as I need to run dynamic sql.</p>