Skip to content

Commit f48a5dc

Browse files
committed
Document std::fs::File close behavior ignoring errors
1 parent 07d3508 commit f48a5dc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/libstd/fs.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ use crate::time::SystemTime;
2121
/// it was opened with. Files also implement [`Seek`] to alter the logical cursor
2222
/// that the file contains internally.
2323
///
24-
/// Files are automatically closed when they go out of scope.
24+
/// Files are automatically closed when they go out of scope. All errors are
25+
/// ignored due to complications with correctly handling them. For instance, an
26+
/// error in closing a file could mean that closing failed, or that the file had
27+
/// an error before closing that was only unearthed by closing the file.
2528
///
2629
/// # Examples
2730
///

0 commit comments

Comments
 (0)