Struct clippy_utils::consts::ConstEvalLateContext
source · [−]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
impl<'a, 'tcx> !RefUnwindSafe for ConstEvalLateContext<'a, 'tcx>
impl<'a, 'tcx> !Send for ConstEvalLateContext<'a, 'tcx>
impl<'a, 'tcx> !Sync for ConstEvalLateContext<'a, 'tcx>
impl<'a, 'tcx> Unpin for ConstEvalLateContext<'a, 'tcx> where
'tcx: 'a,
impl<'a, 'tcx> !UnwindSafe for ConstEvalLateContext<'a, 'tcx>
Blanket Implementations
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