Skip to content

Commit 7c06c5a

Browse files
committed
Improve std::io::ErrorKind
Hopefully make this distinction a little more clear. Fixes #27637
1 parent c6291e0 commit 7c06c5a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/libstd/io/error.rs

+3
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ pub enum ErrorKind {
125125
/// Unlike `InvalidInput`, this typically means that the operation
126126
/// parameters were valid, however the error was caused by malformed
127127
/// input data.
128+
///
129+
/// For example, a function that reads a file into a string will error with
130+
/// `InvalidData` if the file's contents are not valid UTF-8.
128131
#[stable(feature = "io_invalid_data", since = "1.2.0")]
129132
InvalidData,
130133
/// The I/O operation's timeout expired, causing it to be canceled.

0 commit comments

Comments
 (0)