[−][src]Enum rustc_middle::mir::AssertKind

pub enum AssertKind<O> {
    BoundsCheck {
        len: O,
        index: O,
    },
    Overflow(BinOp, O, O),
    OverflowNeg(O),
    DivisionByZero(O),
    RemainderByZero(O),
    ResumedAfterReturn(GeneratorKind),
    ResumedAfterPanic(GeneratorKind),
}

Information about an assertion failure.

Variants

BoundsCheck

Fields of BoundsCheck

len: Oindex: O
Overflow(BinOp, O, O)
OverflowNeg(O)
DivisionByZero(O)
RemainderByZero(O)
ResumedAfterReturn(GeneratorKind)
ResumedAfterPanic(GeneratorKind)

Implementations

impl<O> AssertKind<O>[src]

pub fn description(&self) -> &'static str[src]

Getting a description does not require O to be printable, and does not require allocation. The caller is expected to handle BoundsCheck separately.

pub(in mir) fn fmt_assert_args<W: Write>(
    &self,
    f: &mut W
) -> Result where
    O: Debug, 
[src]

Format the message arguments for the assert(cond, msg..) terminator in MIR printing.

Trait Implementations

impl<O: Clone> Clone for AssertKind<O>[src]

impl<O: Debug> Debug for AssertKind<O>[src]

impl<'tcx, O, __D: TyDecoder<'tcx>> Decodable<__D> for AssertKind<O> where
    O: Decodable<__D>, 
[src]

impl<'tcx, O, __E: TyEncoder<'tcx>> Encodable<__E> for AssertKind<O> where
    O: Encodable<__E>, 
[src]

impl<'__ctx, O> HashStable<StableHashingContext<'__ctx>> for AssertKind<O> where
    O: HashStable<StableHashingContext<'__ctx>>, 
[src]

impl<O: PartialEq> PartialEq<AssertKind<O>> for AssertKind<O>[src]

impl<O> StructuralPartialEq for AssertKind<O>[src]

Auto Trait Implementations

impl<O> RefUnwindSafe for AssertKind<O> where
    O: RefUnwindSafe, 

impl<O> Send for AssertKind<O> where
    O: Send, 

impl<O> Sync for AssertKind<O> where
    O: Sync, 

impl<O> Unpin for AssertKind<O> where
    O: Unpin, 

impl<O> UnwindSafe for AssertKind<O> where
    O: UnwindSafe, 

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized, 
[src]

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

impl<'a, T> Captures<'a> for T where
    T: ?Sized, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> MaybeResult<T> for T[src]

type Error = !

impl<T> ToOwned for T where
    T: Clone, 
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> WithConstness for T[src]