[−][src]Module rustc_mir::transform::check_consts::ops

Concrete error types for all operations which may be invalid in a certain const context.

Modules

ty

Structs

CellBorrow

A borrow of a type that contains an UnsafeCell somewhere. The borrow might escape to the final value of the constant, and thus we cannot allow this (for now). We may allow it in the future for static items.

FloatingPointOp
FnCallIndirect

A function call where the callee is a pointer.

FnCallNonConst

A function call where the callee is not marked as const.

FnCallUnstable

A call to a #[unstable] const fn or #[rustc_const_unstable] function.

FnPtrCast
Generator
HeapAllocation
InlineAsm
LiveDrop
MutBorrow
MutDeref
Panic
RawPtrComparison
RawPtrDeref
RawPtrToIntCast
StaticAccess

An access to a (non-thread-local) static.

ThreadLocalAccess

An access to a thread-local static.

TransientCellBorrow

A borrow of a type that contains an UnsafeCell somewhere. The borrow never escapes to the final value of the constant.

Transmute
UnionAccess
UnsizingCast

See #64992.

Enums

DiagnosticImportance
Status

Traits

NonConstOp

An operation that is not always allowed in a const context.

Functions

mcf_build_error
mcf_status_in_item