]> git.lizzy.rs Git - rust.git/commitdiff
Document using `sync_all`
authorChris Gregory <czipperz@gmail.com>
Tue, 2 Apr 2019 02:34:57 +0000 (22:34 -0400)
committerChris Gregory <czipperz@gmail.com>
Tue, 2 Apr 2019 02:34:57 +0000 (22:34 -0400)
src/libstd/fs.rs

index 06d8ee99b64d1b92e333e1fa15bf3af45cdfb57d..99dd0d8eeeb0e3d2dfbc66038d1e060515f3948a 100644 (file)
 /// 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.  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.
+/// Files are automatically closed when they go out of scope.  Errors detected
+/// on closing are ignored by the implementation of `Drop`.  Use the method
+/// `sync_all` if these errors must be manually handled.
 ///
 /// # Examples
 ///