Explain the ()
argument to ErrorGuaranteed
.
This commit is contained in:
parent
b0a07595b5
commit
d76661bf25
@ -2247,6 +2247,9 @@ where
|
||||
|
||||
/// Useful type to use with `Result<>` indicate that an error has already
|
||||
/// been reported to the user, so no need to continue checking.
|
||||
///
|
||||
/// The `()` field is necessary: it is non-`pub`, which means values of this
|
||||
/// type cannot be constructed outside of this crate.
|
||||
#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
|
||||
#[derive(HashStable_Generic)]
|
||||
pub struct ErrorGuaranteed(());
|
||||
|
Loading…
x
Reference in New Issue
Block a user