about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChris Gregory <czipperz@gmail.com>2019-03-27 16:37:50 -0400
committerChris Gregory <czipperz@gmail.com>2019-03-27 16:37:50 -0400
commitf48a5dcf8f2427d15b8e8df51b610dbc3448816e (patch)
tree7f13b2f1c56f623d55a27e9e3fac1f4e647b14ca
parent07d350897c7f95bb40ae9762ad1e945f95fc37ae (diff)
downloadrust-f48a5dcf8f2427d15b8e8df51b610dbc3448816e.tar.gz
rust-f48a5dcf8f2427d15b8e8df51b610dbc3448816e.zip
Document std::fs::File close behavior ignoring errors
-rw-r--r--src/libstd/fs.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs
index dfff44b88ea..06d8ee99b64 100644
--- a/src/libstd/fs.rs
+++ b/src/libstd/fs.rs
@@ -21,7 +21,10 @@ use crate::time::SystemTime;
 /// it was opened with. Files also implement [`Seek`] to alter the logical cursor
 /// that the file contains internally.
 ///
-/// Files are automatically closed when they go out of scope.
+/// Files are automatically closed when they go out of scope.  All errors are
+/// ignored due to complications with correctly handling them.  For instance, an
+/// error in closing a file could mean that closing failed, or that the file had
+/// an error before closing that was only unearthed by closing the file.
 ///
 /// # Examples
 ///