about summary refs log tree commit diff
path: root/library/std
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2024-10-09 12:43:23 -0700
committerJosh Stone <jistone@redhat.com>2024-10-09 12:43:23 -0700
commit7b52e6bc479bcefc531fde4947c00cc725d8813d (patch)
tree1f72b3e4991103fbe29705cb9890f2550a993734 /library/std
parenta1eceec00b2684f947481696ae2322e20d59db60 (diff)
downloadrust-7b52e6bc479bcefc531fde4947c00cc725d8813d.tar.gz
rust-7b52e6bc479bcefc531fde4947c00cc725d8813d.zip
Mention allocation errors for `open_buffered`
Diffstat (limited to 'library/std')
-rw-r--r--library/std/src/fs.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/library/std/src/fs.rs b/library/std/src/fs.rs
index 124ef121b18..675140ff18f 100644
--- a/library/std/src/fs.rs
+++ b/library/std/src/fs.rs
@@ -394,7 +394,8 @@ impl File {
     ///
     /// # Errors
     ///
-    /// This function will return an error if `path` does not already exist.
+    /// This function will return an error if `path` does not already exist,
+    /// or if memory allocation fails for the new buffer.
     /// Other errors may also be returned according to [`OpenOptions::open`].
     ///
     /// # Examples