mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-22 04:34:51 +00:00
Update library/std/src/io/error.rs
Co-authored-by: Josh Triplett <josh@joshtriplett.org>
This commit is contained in:
parent
057dc09eae
commit
c46d9f6c89
@ -148,7 +148,7 @@ struct Custom {
|
||||
/// "all other errors".
|
||||
///
|
||||
/// In comprehensive and thorough tests that want to verify that a test doesn't return any known incorrect error kind,
|
||||
/// you may want to cut-and-paste the current list of errors from here into your test code. This seems counterintuitive,
|
||||
/// you may want to cut-and-paste the current full list of errors from here into your test code, and then match `_` as the correct case. This seems counterintuitive,
|
||||
/// but it will make your tests more robust. In particular, if you want to verify that your code does produce an
|
||||
/// unrecognized error kind, the robust solution is to check for all the recognized error kinds and fail in those cases.
|
||||
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
|
||||
|
Loading…
Reference in New Issue
Block a user