Explain the ()
argument to ErrorGuaranteed
.
This commit is contained in:
parent
b0a07595b5
commit
d76661bf25
1 changed files with 3 additions and 0 deletions
|
@ -2247,6 +2247,9 @@ where
|
||||||
|
|
||||||
/// Useful type to use with `Result<>` indicate that an error has already
|
/// Useful type to use with `Result<>` indicate that an error has already
|
||||||
/// been reported to the user, so no need to continue checking.
|
/// 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(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
|
||||||
#[derive(HashStable_Generic)]
|
#[derive(HashStable_Generic)]
|
||||||
pub struct ErrorGuaranteed(());
|
pub struct ErrorGuaranteed(());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue