Struct rustc_const_eval::transform::check_consts::check::Checker [−][src]
pub struct Checker<'mir, 'tcx> {
ccx: &'mir ConstCx<'mir, 'tcx>,
qualifs: Qualifs<'mir, 'tcx>,
span: Span,
local_has_storage_dead: Option<BitSet<Local>>,
error_emitted: Option<ErrorReported>,
secondary_errors: Vec<Diagnostic>,
}
Fields
ccx: &'mir ConstCx<'mir, 'tcx>
qualifs: Qualifs<'mir, 'tcx>
span: Span
The span of the current statement.
local_has_storage_dead: Option<BitSet<Local>>
A set that stores for each local whether it has a StorageDead
for it somewhere.
error_emitted: Option<ErrorReported>
secondary_errors: Vec<Diagnostic>
Implementations
Emits an error if an expression cannot be evaluated in the current context.
Emits an error at the given span
if an expression cannot be evaluated in the current
context.
Methods from Deref<Target = ConstCx<'mir, 'tcx>>
Returns the kind of const context this Item
represents (const
, static
, etc.).
Panics if this Item
is not const.
Trait Implementations
fn visit_projection_elem(
&mut self,
place_local: Local,
proj_base: &[PlaceElem<'tcx>],
elem: PlaceElem<'tcx>,
context: PlaceContext,
location: Location
)
fn visit_ascribe_user_ty(
&mut self,
place: &Place<'tcx>,
variance: &Variance,
user_ty: &UserTypeProjection,
location: Location
)
fn visit_projection(
&mut self,
place_ref: PlaceRef<'tcx>,
context: PlaceContext,
location: Location
)
fn super_projection(
&mut self,
place_ref: PlaceRef<'tcx>,
context: PlaceContext,
location: Location
)
fn super_projection_elem(
&mut self,
_local: Local,
_proj_base: &[ProjectionElem<Local, &'tcx TyS<'tcx>>],
elem: ProjectionElem<Local, &'tcx TyS<'tcx>>,
_context: PlaceContext,
location: Location
)
fn visit_user_type_annotation(
&mut self,
index: UserTypeAnnotationIndex,
ty: &CanonicalUserTypeAnnotation<'tcx>
)
fn super_ascribe_user_ty(
&mut self,
place: &Place<'tcx>,
_variance: &Variance,
user_ty: &UserTypeProjection,
location: Location
)
fn super_user_type_annotation(
&mut self,
_index: UserTypeAnnotationIndex,
ty: &CanonicalUserTypeAnnotation<'tcx>
)
Auto Trait Implementations
impl<'mir, 'tcx> !RefUnwindSafe for Checker<'mir, 'tcx>
impl<'mir, 'tcx> !UnwindSafe for Checker<'mir, '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: 520 bytes