about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2021-05-10 12:56:35 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2021-05-10 12:57:19 +0100
commit74e0e45f3c32aef30ab5cdb7bf1980eb087830de (patch)
tree312e3d5b77b5651971d1555b4cf309c83ac8103e /library/std/src
parent2fb1dee14b3eff979f91e99ad034cfe262fc78c3 (diff)
downloadrust-74e0e45f3c32aef30ab5cdb7bf1980eb087830de.tar.gz
rust-74e0e45f3c32aef30ab5cdb7bf1980eb087830de.zip
io::Seek: Mention that seeking can fail due to buffer flush fail
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/io/mod.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/library/std/src/io/mod.rs b/library/std/src/io/mod.rs
index 94c70c4f267..110cb86498e 100644
--- a/library/std/src/io/mod.rs
+++ b/library/std/src/io/mod.rs
@@ -1663,6 +1663,8 @@ pub trait Seek {
     ///
     /// # Errors
     ///
+    /// Seeking can fail, for example becaue it might involve flushing a buffer.
+    ///
     /// Seeking to a negative offset is considered an error.
     #[stable(feature = "rust1", since = "1.0.0")]
     fn seek(&mut self, pos: SeekFrom) -> Result<u64>;