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

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

Information about an assertion failure.

Variants

BoundsCheck

Fields of BoundsCheck

len: Oindex: O
Overflow(BinOp, O, O)

Tuple Fields of Overflow

0: BinOp1: O2: O
OverflowNeg(O)

Tuple Fields of OverflowNeg

0: O
DivisionByZero(O)

Tuple Fields of DivisionByZero

0: O
RemainderByZero(O)

Tuple Fields of RemainderByZero

0: O
ResumedAfterReturn(GeneratorKind)

Tuple Fields of ResumedAfterReturn

0: GeneratorKind
ResumedAfterPanic(GeneratorKind)

Tuple Fields of ResumedAfterPanic

0: GeneratorKind

Implementations

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

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

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

This method turns the parameters of a DepNodeConstructor into an opaque Fingerprint to be used in DepNode. Not all DepNodeParams support being turned into a Fingerprint (they don’t need to if the corresponding DepNode is anonymous). Read more

This method tries to recover the query key from the given DepNode, something which is needed when forcing DepNodes during red-green evaluation. The query system will only call this method if fingerprint_style() is not FingerprintStyle::Opaque. It is always valid to return None here, in which case incremental compilation will treat the query as having changed instead of forcing it. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Layout

Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.