about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorjethrogb <github@jbeekman.nl>2018-02-23 11:57:38 -0800
committerGitHub <noreply@github.com>2018-02-23 11:57:38 -0800
commitcfad25ee8fb9866d0cbdc43e3a89a00aed13e12c (patch)
treeaa3b5c5de228b62fbc003611916167445eedd562 /src/libstd
parent063deba92e44809125a433ca6e6c1ad0993313bf (diff)
downloadrust-cfad25ee8fb9866d0cbdc43e3a89a00aed13e12c.tar.gz
rust-cfad25ee8fb9866d0cbdc43e3a89a00aed13e12c.zip
Clarify interfaction between File::set_len and file cursor
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/fs.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs
index 292a78278ab..db52ed67d3a 100644
--- a/src/libstd/fs.rs
+++ b/src/libstd/fs.rs
@@ -453,6 +453,10 @@ impl File {
     /// will be extended to `size` and have all of the intermediate data filled
     /// in with 0s.
     ///
+    /// The file's cursor isn't changed. In particular, if the cursor was at the
+    /// end and the file is shrunk using this operation, the cursor will now be
+    /// past the end.
+    ///
     /// # Errors
     ///
     /// This function will return an error if the file is not opened for writing.