title: Why is it possible to implement Read on an immutable reference to File?
body: <p>If you check out the <a href="http://doc.rust-lang.org/std/io/trait.Read.html" rel="noreferrer">docs for <code>Read</code></a>, most of the methods accept a <code>&amp;mut self</code>. This makes sense, as reading from something usually updates an internal offset so the next read returns different data. However, this compiles:</p>
  
  <pre><code>use std::io::Read;
  use std::fs::File;
  
  fn main() {
      let file = File::open("/etc/hosts").unwrap();
      let vec = &amp;mut Vec::new();
      (&amp;file).read_to_end(vec).unwrap();
      println!("{:?}", vec);
  }
  </code></pre>
  
  <p>The file isn't mutable, but the data is certainly being read in. This seems incorrect to me. <a href="https://stackoverflow.com/q/31503429/155423">It was pointed out that there is an <code>impl&lt;'a&gt; Read for &amp;'a File</code></a>, but the fact that an immutable instance is seemingly being mutated still seems odd.</p>