Struct rustc_errors::ErrorGuaranteed
source · pub struct ErrorGuaranteed(pub(crate) ());
Expand description
Useful type to use with Result<>
indicate that an error has already
been reported to the user, so no need to continue checking.
Tuple Fields§
§0: ()
Implementations§
source§impl ErrorGuaranteed
impl ErrorGuaranteed
sourcepub fn unchecked_claim_error_was_emitted() -> Self
pub fn unchecked_claim_error_was_emitted() -> Self
To be used only if you really know what you are doing… ideally, we would find a way to eliminate all calls to this method.
Trait Implementations§
source§impl Clone for ErrorGuaranteed
impl Clone for ErrorGuaranteed
source§fn clone(&self) -> ErrorGuaranteed
fn clone(&self) -> ErrorGuaranteed
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ErrorGuaranteed
impl Debug for ErrorGuaranteed
source§impl<__D: Decoder> Decodable<__D> for ErrorGuaranteed
impl<__D: Decoder> Decodable<__D> for ErrorGuaranteed
source§impl EmissionGuarantee for ErrorGuaranteed
impl EmissionGuarantee for ErrorGuaranteed
source§fn diagnostic_builder_emit_producing_guarantee(
db: &mut DiagnosticBuilder<'_, Self>
) -> Self
fn diagnostic_builder_emit_producing_guarantee(
db: &mut DiagnosticBuilder<'_, Self>
) -> Self
Implementation of
DiagnosticBuilder::emit
, fully controlled by each
impl
of EmissionGuarantee
, to make it impossible to create a value
of Self
without actually performing the emission. Read moresource§fn make_diagnostic_builder(
handler: &Handler,
msg: impl Into<DiagnosticMessage>
) -> DiagnosticBuilder<'_, Self>
fn make_diagnostic_builder(
handler: &Handler,
msg: impl Into<DiagnosticMessage>
) -> DiagnosticBuilder<'_, Self>
Creates a new
DiagnosticBuilder
that will return this type of guarantee.source§impl<__E: Encoder> Encodable<__E> for ErrorGuaranteed
impl<__E: Encoder> Encodable<__E> for ErrorGuaranteed
source§impl Hash for ErrorGuaranteed
impl Hash for ErrorGuaranteed
source§impl<__CTX> HashStable<__CTX> for ErrorGuaranteedwhere
__CTX: HashStableContext,
impl<__CTX> HashStable<__CTX> for ErrorGuaranteedwhere
__CTX: HashStableContext,
fn hash_stable(&self, __hcx: &mut __CTX, __hasher: &mut StableHasher)
source§impl Ord for ErrorGuaranteed
impl Ord for ErrorGuaranteed
source§fn cmp(&self, other: &ErrorGuaranteed) -> Ordering
fn cmp(&self, other: &ErrorGuaranteed) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<ErrorGuaranteed> for ErrorGuaranteed
impl PartialEq<ErrorGuaranteed> for ErrorGuaranteed
source§fn eq(&self, other: &ErrorGuaranteed) -> bool
fn eq(&self, other: &ErrorGuaranteed) -> bool
source§impl PartialOrd<ErrorGuaranteed> for ErrorGuaranteed
impl PartialOrd<ErrorGuaranteed> for ErrorGuaranteed
source§fn partial_cmp(&self, other: &ErrorGuaranteed) -> Option<Ordering>
fn partial_cmp(&self, other: &ErrorGuaranteed) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for ErrorGuaranteed
impl Eq for ErrorGuaranteed
impl StructuralEq for ErrorGuaranteed
impl StructuralPartialEq for ErrorGuaranteed
Auto Trait Implementations§
impl RefUnwindSafe for ErrorGuaranteed
impl Send for ErrorGuaranteed
impl Sync for ErrorGuaranteed
impl Unpin for ErrorGuaranteed
impl UnwindSafe for ErrorGuaranteed
Blanket Implementations§
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 0 bytes