rustc_middle::mir

Type Alias AssertMessage

source
pub type AssertMessage<'tcx> = AssertKind<Operand<'tcx>>;
Expand description

Type for MIR Assert terminator error messages.

Aliased Type§

enum AssertMessage<'tcx> {
    BoundsCheck {
        len: Operand<'tcx>,
        index: Operand<'tcx>,
    },
    Overflow(BinOp, Operand<'tcx>, Operand<'tcx>),
    OverflowNeg(Operand<'tcx>),
    DivisionByZero(Operand<'tcx>),
    RemainderByZero(Operand<'tcx>),
    ResumedAfterReturn(CoroutineKind),
    ResumedAfterPanic(CoroutineKind),
    MisalignedPointerDereference {
        required: Operand<'tcx>,
        found: Operand<'tcx>,
    },
}

Variants§

§

BoundsCheck

Fields

§len: Operand<'tcx>
§index: Operand<'tcx>
§

Overflow(BinOp, Operand<'tcx>, Operand<'tcx>)

§

OverflowNeg(Operand<'tcx>)

§

DivisionByZero(Operand<'tcx>)

§

RemainderByZero(Operand<'tcx>)

§

ResumedAfterReturn(CoroutineKind)

§

ResumedAfterPanic(CoroutineKind)

§

MisalignedPointerDereference

Fields

§required: Operand<'tcx>
§found: Operand<'tcx>

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: 56 bytes

Size for each variant:

  • BoundsCheck: 56 bytes
  • Overflow: 56 bytes
  • OverflowNeg: 32 bytes
  • DivisionByZero: 32 bytes
  • RemainderByZero: 32 bytes
  • ResumedAfterReturn: 10 bytes
  • ResumedAfterPanic: 10 bytes
  • MisalignedPointerDereference: 56 bytes