pub struct MirLoweringCtxt<'a, 'sess, 'tcx> {
tcx: TyCtxt<'tcx>,
param_env: ParamEnv<'tcx>,
selcx: SelectionContext<'a, 'tcx>,
sess: &'sess FluxSession,
rustc_mir: &'a Body<'tcx>,
}
Fields§
§tcx: TyCtxt<'tcx>
§param_env: ParamEnv<'tcx>
§selcx: SelectionContext<'a, 'tcx>
§sess: &'sess FluxSession
§rustc_mir: &'a Body<'tcx>
Implementations§
Source§impl<'sess, 'tcx> MirLoweringCtxt<'_, 'sess, 'tcx>
impl<'sess, 'tcx> MirLoweringCtxt<'_, 'sess, 'tcx>
pub fn lower_mir_body( tcx: TyCtxt<'tcx>, sess: &'sess FluxSession, def_id: LocalDefId, body_with_facts: BodyWithBorrowckFacts<'tcx>, ) -> Result<Body<'tcx>, ErrorGuaranteed>
fn lower_basic_block_data( &mut self, data: &BasicBlockData<'tcx>, ) -> Result<BasicBlockData<'tcx>, ErrorGuaranteed>
fn lower_local_decl( &self, local_decl: &LocalDecl<'tcx>, ) -> Result<LocalDecl, ErrorGuaranteed>
fn lower_statement( &self, stmt: &Statement<'tcx>, ) -> Result<Statement, ErrorGuaranteed>
fn lower_terminator( &mut self, terminator: &Terminator<'tcx>, ) -> Result<Terminator<'tcx>, ErrorGuaranteed>
fn resolve_call( &mut self, callee_id: DefId, args: GenericArgsRef<'tcx>, ) -> Result<(DefId, CallArgs<'tcx>), UnsupportedReason>
fn lower_rvalue( &self, rvalue: &Rvalue<'tcx>, ) -> Result<Rvalue, UnsupportedReason>
fn lower_pointer_coercion( &self, coercion: PointerCoercion, ) -> Option<PointerCast>
fn lower_cast_kind(&self, kind: CastKind) -> Option<CastKind>
fn lower_aggregate_kind( &self, aggregate_kind: &AggregateKind<'tcx>, ) -> Result<AggregateKind, UnsupportedReason>
fn lower_bin_op(&self, bin_op: BinOp) -> Result<BinOp, UnsupportedReason>
fn lower_null_op( &self, null_op: NullOp<'_>, ) -> Result<NullOp, UnsupportedReason>
fn lower_operand( &self, op: &Operand<'tcx>, ) -> Result<Operand, UnsupportedReason>
fn lower_constant( &self, constant: &ConstOperand<'tcx>, ) -> Result<Constant, UnsupportedReason>
Sourcefn scalar_int_to_constant(
&self,
scalar: ScalarInt,
ty: Ty<'tcx>,
) -> Option<Constant>
fn scalar_int_to_constant( &self, scalar: ScalarInt, ty: Ty<'tcx>, ) -> Option<Constant>
A ScalarInt
is just a set of bits that can represent any scalar value.
This can represent all the primitive types with a fixed size.
fn lower_assert_msg(&self, msg: &AssertMessage<'_>) -> Option<AssertKind>
Auto Trait Implementations§
impl<'a, 'sess, 'tcx> Freeze for MirLoweringCtxt<'a, 'sess, 'tcx>
impl<'a, 'sess, 'tcx> !RefUnwindSafe for MirLoweringCtxt<'a, 'sess, 'tcx>
impl<'a, 'sess, 'tcx> !Send for MirLoweringCtxt<'a, 'sess, 'tcx>
impl<'a, 'sess, 'tcx> !Sync for MirLoweringCtxt<'a, 'sess, 'tcx>
impl<'a, 'sess, 'tcx> Unpin for MirLoweringCtxt<'a, 'sess, 'tcx>
impl<'a, 'sess, 'tcx> !UnwindSafe for MirLoweringCtxt<'a, 'sess, 'tcx>
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
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