title: E0308 during String variable assignment
body: <p>I am trying to read text files and use <a href="https://github.com/nfinger/text-summarize" rel="nofollow noreferrer">the text-summarize library</a> to generate short summaries. As far as I can tell, it accepts a string, passes it to an open API for a text summary website and returns the summary.</p>
  <p>I am trying to write a simple script to read a local file, summarize and return the summary.</p>
  <pre class="lang-rust prettyprint-override"><code>use std::fs;
  mod lib;
  
  fn main() {
      println!(&quot;In file {}&quot;, &quot;poem.txt&quot;);
      let contents = fs::read_to_string(&quot;poem.txt&quot;).expect(&quot;Something went wrong reading the file&quot;);
      println!(&quot;With text:\n{}&quot;, contents);
      let summ = lib::summarize_text(contents);
  }
  </code></pre>
  <p>However, the contents variable I pass to the <code>summarize_text</code> function is the wrong kind of string and at this point I have no idea why. I checked the <code>rustc --explain E0308</code> which was suggested as a helpful link but didn't understand the discussion.</p>