pub(crate) struct Checker<'ck, 'genv, 'tcx, M> {
    genv: GlobalEnv<'genv, 'tcx>,
    def_id: LocalDefId,
    inherited: Inherited<'ck, M>,
    body: &'ck Body<'tcx>,
    resume_ty: Option<Ty>,
    output: Binder<FnOutput>,
    markers: IndexVec<BasicBlock, Option<Marker>>,
    visited: DenseBitSet<BasicBlock>,
    queue: WorkQueue<'ck>,
    default_refiner: Refiner<'genv, 'tcx>,
}Fields§
§genv: GlobalEnv<'genv, 'tcx>§def_id: LocalDefIdLocalDefId of the function-like item being checked.
inherited: Inherited<'ck, M>§body: &'ck Body<'tcx>§resume_ty: Option<Ty>The type used for the resume argument if we are checking a generator.
output: Binder<FnOutput>§markers: IndexVec<BasicBlock, Option<Marker>>A marker to the node in the refinement tree at the end of the basic block after applying the effects of the terminator.
visited: DenseBitSet<BasicBlock>§queue: WorkQueue<'ck>§default_refiner: Refiner<'genv, 'tcx>Implementations§
Source§impl<'ck, 'genv, 'tcx> Checker<'ck, 'genv, 'tcx, ShapeMode>
 
impl<'ck, 'genv, 'tcx> Checker<'ck, 'genv, 'tcx, ShapeMode>
pub(crate) fn run_in_shape_mode( genv: GlobalEnv<'genv, 'tcx>, local_id: LocalDefId, ghost_stmts: &'ck UnordMap<LocalDefId, GhostStatements>, closures: &'ck mut UnordMap<DefId, PolyFnSig>, opts: InferOpts, ) -> Result<ShapeResult, CheckerError>
Source§impl<'ck, 'genv, 'tcx> Checker<'ck, 'genv, 'tcx, RefineMode>
 
impl<'ck, 'genv, 'tcx> Checker<'ck, 'genv, 'tcx, RefineMode>
pub(crate) fn run_in_refine_mode( genv: GlobalEnv<'genv, 'tcx>, local_id: LocalDefId, ghost_stmts: &'ck UnordMap<LocalDefId, GhostStatements>, closures: &'ck mut UnordMap<DefId, PolyFnSig>, bb_env_shapes: ShapeResult, opts: InferOpts, ) -> Result<InferCtxtRoot<'genv, 'tcx>, CheckerError>
Source§impl<'ck, 'genv, 'tcx, M: Mode> Checker<'ck, 'genv, 'tcx, M>
 
impl<'ck, 'genv, 'tcx, M: Mode> Checker<'ck, 'genv, 'tcx, M>
fn run( infcx: InferCtxt<'_, 'genv, 'tcx>, def_id: LocalDefId, inherited: Inherited<'ck, M>, poly_sig: PolyFnSig, ) -> Result<(), CheckerError>
fn check_basic_block( &mut self, infcx: InferCtxt<'_, 'genv, 'tcx>, env: TypeEnv<'_>, bb: BasicBlock, ) -> Result<(), CheckerError>
fn check_assign_ty( &mut self, infcx: &mut InferCtxt<'_, '_, '_>, env: &mut TypeEnv<'_>, place: &Place, ty: Ty, span: Span, ) -> InferResult
fn check_statement( &mut self, infcx: &mut InferCtxt<'_, 'genv, 'tcx>, env: &mut TypeEnv<'_>, stmt: &Statement, ) -> Result<(), CheckerError>
fn is_exit_block(&self, bb: BasicBlock) -> bool
Sourcefn check_terminator(
    &mut self,
    infcx: &mut InferCtxt<'_, 'genv, 'tcx>,
    env: &mut TypeEnv<'_>,
    terminator: &Terminator<'tcx>,
    last_stmt_span: Option<Span>,
) -> Result<Vec<(BasicBlock, Guard)>, CheckerError>
 
fn check_terminator( &mut self, infcx: &mut InferCtxt<'_, 'genv, 'tcx>, env: &mut TypeEnv<'_>, terminator: &Terminator<'tcx>, last_stmt_span: Option<Span>, ) -> Result<Vec<(BasicBlock, Guard)>, CheckerError>
For check_terminator, the output Vec<BasicBlock, Guard> denotes,
- BasicBlock“successors” of the current terminator, and
- Guardare extra control information from, e.g. the- SwitchInt(or- Assert) you can assume when checking the corresponding successor.
fn check_ret( &mut self, infcx: &mut InferCtxt<'_, 'genv, 'tcx>, env: &mut TypeEnv<'_>, span: Span, ) -> Result<(), CheckerError>
fn check_call( &mut self, infcx: &mut InferCtxt<'_, 'genv, 'tcx>, env: &mut TypeEnv<'_>, span: Span, callee_def_id: Option<DefId>, fn_sig: EarlyBinder<PolyFnSig>, generic_args: &[GenericArg], actuals: &[Ty], ) -> Result<ResolvedCall, CheckerError>
fn check_coroutine_obligations( &mut self, infcx: &mut InferCtxt<'_, 'genv, 'tcx>, obligs: Vec<Binder<CoroutineObligPredicate>>, ) -> Result<(), CheckerError>
fn find_self_ty_fn_sig( &self, self_ty: Ty<'tcx>, span: Span, ) -> Result<PolyFnSig, CheckerError>
fn check_fn_trait_clause( &mut self, infcx: &mut InferCtxt<'_, 'genv, 'tcx>, poly_fn_trait_pred: &Binder<FnTraitPredicate>, span: Span, ) -> Result<(), CheckerError>
fn check_assert( &mut self, infcx: &mut InferCtxt<'_, '_, '_>, env: &mut TypeEnv<'_>, terminator_span: Span, cond: &Operand, expected: bool, msg: &AssertKind, ) -> InferResult<Guard>
Sourcefn check_if(discr_ty: &Ty, targets: &SwitchTargets) -> Vec<(BasicBlock, Guard)>
 
fn check_if(discr_ty: &Ty, targets: &SwitchTargets) -> Vec<(BasicBlock, Guard)>
Checks conditional branching as in a match statement. SwitchTargets contains a list of branches - the exact bit value which is being compared and the block to jump to. Using the conditionals, each branch can be checked using the new control flow information.
See https://github.com/flux-rs/flux/pull/840#discussion_r1786543174
fn check_match( infcx: &mut InferCtxt<'_, 'genv, 'tcx>, env: &mut TypeEnv<'_>, discr_ty: &Ty, targets: &SwitchTargets, span: Span, ) -> Vec<(BasicBlock, Guard)>
fn check_successors( &mut self, infcx: InferCtxt<'_, 'genv, 'tcx>, env: TypeEnv<'_>, from: BasicBlock, terminator_span: Span, successors: Vec<(BasicBlock, Guard)>, ) -> Result<(), CheckerError>
fn check_goto( &mut self, infcx: InferCtxt<'_, 'genv, 'tcx>, env: TypeEnv<'_>, span: Span, target: BasicBlock, ) -> Result<(), CheckerError>
fn closure_template( &mut self, infcx: &mut InferCtxt<'_, 'genv, 'tcx>, env: &mut TypeEnv<'_>, stmt_span: Span, args: &GenericArgs, operands: &[Operand], ) -> InferResult<(Vec<Ty>, PolyFnSig)>
fn check_closure_body( &mut self, infcx: &mut InferCtxt<'_, 'genv, 'tcx>, did: &DefId, upvar_tys: &[Ty], args: &GenericArgs, poly_sig: &PolyFnSig, ) -> Result<(), CheckerError>
fn check_rvalue_closure( &mut self, infcx: &mut InferCtxt<'_, 'genv, 'tcx>, env: &mut TypeEnv<'_>, stmt_span: Span, did: &DefId, args: &GenericArgs, operands: &[Operand], ) -> Result<Ty, CheckerError>
fn check_rvalue( &mut self, infcx: &mut InferCtxt<'_, 'genv, 'tcx>, env: &mut TypeEnv<'_>, stmt_span: Span, rvalue: &Rvalue, ) -> Result<Ty, CheckerError>
fn check_raw_ptr_metadata( &mut self, infcx: &mut InferCtxt<'_, '_, '_>, env: &mut TypeEnv<'_>, stmt_span: Span, place: &Place, ) -> Result<Ty, CheckerError>
fn check_binary_op( &mut self, infcx: &mut InferCtxt<'_, '_, '_>, env: &mut TypeEnv<'_>, stmt_span: Span, bin_op: BinOp, op1: &Operand, op2: &Operand, ) -> InferResult<Ty>
fn check_nullary_op(&self, null_op: NullOp, _ty: &Ty) -> Ty
fn check_unary_op( &mut self, infcx: &mut InferCtxt<'_, 'genv, 'tcx>, env: &mut TypeEnv<'_>, stmt_span: Span, un_op: UnOp, op: &Operand, ) -> InferResult<Ty>
fn check_mk_array( &mut self, infcx: &mut InferCtxt<'_, 'genv, 'tcx>, env: &mut TypeEnv<'_>, stmt_span: Span, args: &[Ty], arr_ty: Ty, ) -> InferResult<Ty>
fn check_cast( &self, infcx: &mut InferCtxt<'_, 'genv, 'tcx>, env: &mut TypeEnv<'_>, stmt_span: Span, kind: CastKind, from: &Ty, to: &Ty, ) -> InferResult<Ty>
fn discr_to_int_cast(adt_def: &AdtDef, bty: BaseTy) -> Ty
fn check_unsize_cast( &self, infcx: &mut InferCtxt<'_, 'genv, 'tcx>, env: &mut TypeEnv<'_>, span: Span, src: &Ty, dst: &Ty, ) -> InferResult<Ty>
fn check_operands( &mut self, infcx: &mut InferCtxt<'_, 'genv, 'tcx>, env: &mut TypeEnv<'_>, span: Span, operands: &[Operand], ) -> InferResult<Vec<Ty>>
fn check_operand( &mut self, infcx: &mut InferCtxt<'_, '_, '_>, env: &mut TypeEnv<'_>, span: Span, operand: &Operand, ) -> InferResult<Ty>
fn check_constant(&mut self, c: &Constant) -> QueryResult<Ty>
fn check_ghost_statements_at( &mut self, infcx: &mut InferCtxt<'_, 'genv, 'tcx>, env: &mut TypeEnv<'_>, point: Point, span: Span, ) -> Result<(), CheckerError>
fn check_ghost_statement( &mut self, infcx: &mut InferCtxt<'_, 'genv, 'tcx>, env: &mut TypeEnv<'_>, stmt: &GhostStatement, span: Span, ) -> InferResult
fn marker_at_dominator(&self, bb: BasicBlock) -> &Marker
fn dominators(&self) -> &'ck Dominators<BasicBlock>
fn ghost_stmts(&self) -> &'ck GhostStatements
fn refine_default<T: Refine>(&self, ty: &T) -> QueryResult<T::Output>
fn refine_with_holes<T: Refine>( &self, ty: &T, ) -> QueryResult<<T as Refine>::Output>
Auto Trait Implementations§
impl<'ck, 'genv, 'tcx, M> Freeze for Checker<'ck, 'genv, 'tcx, M>
impl<'ck, 'genv, 'tcx, M> !RefUnwindSafe for Checker<'ck, 'genv, 'tcx, M>
impl<'ck, 'genv, 'tcx, M> !Send for Checker<'ck, 'genv, 'tcx, M>
impl<'ck, 'genv, 'tcx, M> !Sync for Checker<'ck, 'genv, 'tcx, M>
impl<'ck, 'genv, 'tcx, M> Unpin for Checker<'ck, 'genv, 'tcx, M>
impl<'ck, 'genv, 'tcx, M> !UnwindSafe for Checker<'ck, 'genv, 'tcx, M>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
 
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
 
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
 
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
 
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
 
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more