Skip to content

Commit a7b8a13

Browse files
committed
Added missing values in std::io::standard_error()
1 parent b2a8fae commit a7b8a13

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/libstd/io/mod.rs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1408,7 +1408,21 @@ pub fn standard_error(kind: IoErrorKind) -> IoError {
14081408
EndOfFile => "end of file",
14091409
IoUnavailable => "I/O is unavailable",
14101410
InvalidInput => "invalid input",
1411-
_ => fail!()
1411+
OtherIoError => "unknown I/O error",
1412+
FileNotFound => "file not found",
1413+
PermissionDenied => "permission denied",
1414+
ConnectionFailed => "connection failed",
1415+
Closed => "stream is closed",
1416+
ConnectionRefused => "connection refused",
1417+
ConnectionReset => "connection reset",
1418+
ConnectionAborted => "connection aborted",
1419+
NotConnected => "not connected",
1420+
BrokenPipe => "broken pipe",
1421+
PathAlreadyExists => "file exists",
1422+
PathDoesntExist => "no such file",
1423+
MismatchedFileTypeForOperation => "mismatched file type",
1424+
ResourceUnavailable => "resource unavailable",
1425+
TimedOut => "operation timed out"
14121426
};
14131427
IoError {
14141428
kind: kind,

0 commit comments

Comments
 (0)