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
sourceimpl 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
sourceimpl Clone for ErrorGuaranteed
impl Clone for ErrorGuaranteed
sourcefn clone(&self) -> ErrorGuaranteed
fn clone(&self) -> ErrorGuaranteed
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for ErrorGuaranteed
impl Debug for ErrorGuaranteed
sourceimpl<__D: Decoder> Decodable<__D> for ErrorGuaranteed
impl<__D: Decoder> Decodable<__D> for ErrorGuaranteed
sourceimpl EmissionGuarantee for ErrorGuaranteed
impl EmissionGuarantee for ErrorGuaranteed
sourcefn 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 moresourcefn 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.sourceimpl<__E: Encoder> Encodable<__E> for ErrorGuaranteed
impl<__E: Encoder> Encodable<__E> for ErrorGuaranteed
sourceimpl Hash for ErrorGuaranteed
impl Hash for ErrorGuaranteed
sourceimpl<__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)
sourceimpl Ord for ErrorGuaranteed
impl Ord for ErrorGuaranteed
sourcefn cmp(&self, other: &ErrorGuaranteed) -> Ordering
fn cmp(&self, other: &ErrorGuaranteed) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<ErrorGuaranteed> for ErrorGuaranteed
impl PartialEq<ErrorGuaranteed> for ErrorGuaranteed
sourcefn eq(&self, other: &ErrorGuaranteed) -> bool
fn eq(&self, other: &ErrorGuaranteed) -> bool
sourceimpl PartialOrd<ErrorGuaranteed> for ErrorGuaranteed
impl PartialOrd<ErrorGuaranteed> for ErrorGuaranteed
sourcefn partial_cmp(&self, other: &ErrorGuaranteed) -> Option<Ordering>
fn partial_cmp(&self, other: &ErrorGuaranteed) -> Option<Ordering>
1.0.0 · sourcefn 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
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