Skip to content

Commit 425202c

Browse files
committed
Add ErrorKind::OutOfMemory
1 parent bcd696d commit 425202c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

library/std/src/io/error.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,11 @@ pub enum ErrorKind {
186186
/// This means that the operation can never succeed.
187187
#[stable(feature = "unsupported_error", since = "1.53.0")]
188188
Unsupported,
189+
190+
/// An operation could not be completed, because it failed
191+
/// to allocate enough memory.
192+
#[stable(feature = "out_of_memory_error", since = "1.53.0")]
193+
OutOfMemory,
189194
}
190195

191196
impl ErrorKind {
@@ -210,6 +215,7 @@ impl ErrorKind {
210215
ErrorKind::Other => "other os error",
211216
ErrorKind::UnexpectedEof => "unexpected end of file",
212217
ErrorKind::Unsupported => "unsupported",
218+
ErrorKind::OutOfMemory => "out of memory",
213219
}
214220
}
215221
}

0 commit comments

Comments
 (0)