mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
add matching to errorkind
This commit is contained in:
parent
5bd1ec3283
commit
4905814249
@ -141,6 +141,14 @@ struct Custom {
|
||||
/// It is used with the [`io::Error`] type.
|
||||
///
|
||||
/// [`io::Error`]: Error
|
||||
///
|
||||
/// # Handling errors and matching on `ErrorKind`
|
||||
///
|
||||
/// In application code, use `match` for the `ErrorKind` values you are expecting; use `_` to match
|
||||
/// "all other errors".
|
||||
///
|
||||
/// In comprehensive and thorough tests, you may need to cut-and-paste the current list of
|
||||
/// errors from here into your test code.
|
||||
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[allow(deprecated)]
|
||||
|
Loading…
Reference in New Issue
Block a user