Skip to main content

## AssertMessage

# Type Alias AssertMessage

Source

    pub type AssertMessage<'tcx> = AssertKind<Operand<'tcx>>;

Expand description

Type for MIR `Assert` terminator error messages.

## Aliased Type§

    pub 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),
        ResumedAfterDrop(CoroutineKind),
        MisalignedPointerDereference {
            required: Operand<'tcx>,
            found: Operand<'tcx>,
        },
        NullPointerDereference,
        InvalidEnumConstruction(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)

§

### ResumedAfterDrop(CoroutineKind)

§

### MisalignedPointerDereference

#### Fields

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

### NullPointerDereference

§

### InvalidEnumConstruction(Operand<'tcx>)

## 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.