about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-08-18 21:01:19 +0000
committerbors <bors@rust-lang.org>2014-08-18 21:01:19 +0000
commite8ad6a888ea0b03455c0c181cf644e7bca261b14 (patch)
treedea721a7da686a0201a5b0e4904d775597ecc7e8 /src/libstd
parent98ec85f19e42edafc3d82a737f0ccbd1b7f4ff6c (diff)
parent4a288bc4b7025bef6a12c7e0cd196eb8371e2753 (diff)
downloadrust-e8ad6a888ea0b03455c0c181cf644e7bca261b14.tar.gz
rust-e8ad6a888ea0b03455c0c181cf644e7bca261b14.zip
auto merge of #16578 : steveklabnik/rust/gh16239, r=pcwalton
Fies #16239.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/io/fs.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libstd/io/fs.rs b/src/libstd/io/fs.rs
index f95f41509a0..725d3b10def 100644
--- a/src/libstd/io/fs.rs
+++ b/src/libstd/io/fs.rs
@@ -236,10 +236,15 @@ impl File {
         })
     }
 
-    /// Tests whether this stream has reached EOF.
+    /// Returns true if the stream has reached the end of the file.
     ///
     /// If true, then this file will no longer continue to return data via
     /// `read`.
+    ///
+    /// Note that the operating system will not return an `EOF` indicator
+    /// until you have attempted to read past the end of the file, so if
+    /// you've read _exactly_ the number of bytes in the file, this will
+    /// return `false`, not `true`.
     pub fn eof(&self) -> bool {
         self.last_nread == 0
     }