Struct rustc_const_eval::transform::promote_consts::Validator[][src]

struct Validator<'a, 'tcx> {
    ccx: &'a ConstCx<'a, 'tcx>,
    temps: &'a IndexVec<Local, TempState>,
}
Expand description

Checks whether locals that appear in a promotion context (Candidate) are actually promotable.

This wraps an Item, and has access to all fields of that Item via Deref coercion.

Fields

ccx: &'a ConstCx<'a, 'tcx>temps: &'a IndexVec<Local, TempState>

Implementations

Methods from Deref<Target = ConstCx<'a, 'tcx>>

Returns the kind of const context this Item represents (const, static, etc.).

Panics if this Item is not const.

Returns the function signature of the item being const-checked if it is a fn or const fn.

Trait Implementations

The resulting type after dereferencing.

Dereferences the value.

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

Performs the conversion.

Performs the conversion.

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