Struct clippy_utils::consts::ConstEvalLateContext[−][src]

pub struct ConstEvalLateContext<'a, 'tcx> {
    lcx: &'a LateContext<'tcx>,
    typeck_results: &'a TypeckResults<'tcx>,
    param_env: ParamEnv<'tcx>,
    needed_resolution: bool,
    substs: SubstsRef<'tcx>,
}

Fields

lcx: &'a LateContext<'tcx>typeck_results: &'a TypeckResults<'tcx>param_env: ParamEnv<'tcx>needed_resolution: boolsubsts: SubstsRef<'tcx>

Implementations

Simple constant folding: Insert an expression, get a constant or none.

Create Some(Vec![..]) of all constants, unless there is any non-constant part.

Lookup a possibly constant expression from an ExprKind::Path.

A block can only yield a constant if it only has one constant expression.

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