Type Alias rustc_middle::ty::consts::UnevaluatedConst

source ·
pub type UnevaluatedConst<'tcx> = UnevaluatedConst<TyCtxt<'tcx>>;

Aliased Type§

struct UnevaluatedConst<'tcx> {
    pub def: DefId,
    pub args: &'tcx RawList<(), GenericArg<'tcx>>,


§def: DefId§args: &'tcx RawList<(), GenericArg<'tcx>>

Trait Implementations§


impl<'tcx> EraseType for UnevaluatedConst<'tcx>


type Result = [u8; 16]


impl<'tcx> TypeSuperVisitable<TyCtxt<'tcx>> for UnevaluatedConst<'tcx>


fn super_visit_with<V: TypeVisitor<TyCtxt<'tcx>>>( &self, visitor: &mut V, ) -> V::Result

Provides a default visit for a recursive type of interest. This should only be called within TypeVisitor methods, when a non-custom traversal is desired for the value of the type of interest passed to that method. For example, in MyVisitor::visit_ty(ty), it is valid to call ty.super_visit_with(self), but any other visiting should be done with xyz.visit_with(self).

impl<'tcx> UnevaluatedConstEvalExt<'tcx> for UnevaluatedConst<'tcx>


fn prepare_for_eval( self, tcx: TyCtxt<'tcx>, param_env: ParamEnv<'tcx>, ) -> (ParamEnv<'tcx>, Self)

FIXME(RalfJung): I cannot explain what this does or why it makes sense, but not doing this hurts performance.


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