Skip to content

Commit b753540

Browse files
committed
Add ErrorKind::OutOfMemory
1 parent 5491c80 commit b753540

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

tests/ui/wildcard_enum_match_arm.fixed

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ fn main() {
7777
let error_kind = ErrorKind::NotFound;
7878
match error_kind {
7979
ErrorKind::NotFound => {},
80-
ErrorKind::PermissionDenied | ErrorKind::ConnectionRefused | ErrorKind::ConnectionReset | ErrorKind::ConnectionAborted | ErrorKind::NotConnected | ErrorKind::AddrInUse | ErrorKind::AddrNotAvailable | ErrorKind::BrokenPipe | ErrorKind::AlreadyExists | ErrorKind::WouldBlock | ErrorKind::InvalidInput | ErrorKind::InvalidData | ErrorKind::TimedOut | ErrorKind::WriteZero | ErrorKind::Interrupted | ErrorKind::Other | ErrorKind::UnexpectedEof | ErrorKind::Unsupported | _ => {},
80+
ErrorKind::PermissionDenied | ErrorKind::ConnectionRefused | ErrorKind::ConnectionReset | ErrorKind::ConnectionAborted | ErrorKind::NotConnected | ErrorKind::AddrInUse | ErrorKind::AddrNotAvailable | ErrorKind::BrokenPipe | ErrorKind::AlreadyExists | ErrorKind::WouldBlock | ErrorKind::InvalidInput | ErrorKind::InvalidData | ErrorKind::TimedOut | ErrorKind::WriteZero | ErrorKind::Interrupted | ErrorKind::Other | ErrorKind::UnexpectedEof | ErrorKind::Unsupported | ErrorKind::OutOfMemory | _ => {},
8181
}
8282
match error_kind {
8383
ErrorKind::NotFound => {},
@@ -99,6 +99,7 @@ fn main() {
9999
ErrorKind::Other => {},
100100
ErrorKind::UnexpectedEof => {},
101101
ErrorKind::Unsupported => {},
102+
ErrorKind::OutOfMemory => {},
102103
_ => {},
103104
}
104105
}

tests/ui/wildcard_enum_match_arm.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ fn main() {
9999
ErrorKind::Other => {},
100100
ErrorKind::UnexpectedEof => {},
101101
ErrorKind::Unsupported => {},
102+
ErrorKind::OutOfMemory => {},
102103
_ => {},
103104
}
104105
}

tests/ui/wildcard_enum_match_arm.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ error: wildcard matches known variants and will also match future added variants
3232
--> $DIR/wildcard_enum_match_arm.rs:80:9
3333
|
3434
LL | _ => {},
35-
| ^ help: try this: `ErrorKind::PermissionDenied | ErrorKind::ConnectionRefused | ErrorKind::ConnectionReset | ErrorKind::ConnectionAborted | ErrorKind::NotConnected | ErrorKind::AddrInUse | ErrorKind::AddrNotAvailable | ErrorKind::BrokenPipe | ErrorKind::AlreadyExists | ErrorKind::WouldBlock | ErrorKind::InvalidInput | ErrorKind::InvalidData | ErrorKind::TimedOut | ErrorKind::WriteZero | ErrorKind::Interrupted | ErrorKind::Other | ErrorKind::UnexpectedEof | ErrorKind::Unsupported | _`
35+
| ^ help: try this: `ErrorKind::PermissionDenied | ErrorKind::ConnectionRefused | ErrorKind::ConnectionReset | ErrorKind::ConnectionAborted | ErrorKind::NotConnected | ErrorKind::AddrInUse | ErrorKind::AddrNotAvailable | ErrorKind::BrokenPipe | ErrorKind::AlreadyExists | ErrorKind::WouldBlock | ErrorKind::InvalidInput | ErrorKind::InvalidData | ErrorKind::TimedOut | ErrorKind::WriteZero | ErrorKind::Interrupted | ErrorKind::Other | ErrorKind::UnexpectedEof | ErrorKind::Unsupported | ErrorKind::OutOfMemory | _`
3636

3737
error: aborting due to 5 previous errors
3838

0 commit comments

Comments
 (0)