flux_rustc_bridge::lowering

Struct MirLoweringCtxt

Source
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>

Source

pub fn lower_mir_body( tcx: TyCtxt<'tcx>, sess: &'sess FluxSession, def_id: LocalDefId, body_with_facts: BodyWithBorrowckFacts<'tcx>, ) -> Result<Body<'tcx>, ErrorGuaranteed>

Source

fn lower_basic_block_data( &mut self, data: &BasicBlockData<'tcx>, ) -> Result<BasicBlockData<'tcx>, ErrorGuaranteed>

Source

fn lower_local_decl( &self, local_decl: &LocalDecl<'tcx>, ) -> Result<LocalDecl, ErrorGuaranteed>

Source

fn lower_statement( &self, stmt: &Statement<'tcx>, ) -> Result<Statement, ErrorGuaranteed>

Source

fn lower_terminator( &mut self, terminator: &Terminator<'tcx>, ) -> Result<Terminator<'tcx>, ErrorGuaranteed>

Source

fn resolve_call( &mut self, callee_id: DefId, args: GenericArgsRef<'tcx>, ) -> Result<(DefId, CallArgs<'tcx>), UnsupportedReason>

Source

fn lower_rvalue( &self, rvalue: &Rvalue<'tcx>, ) -> Result<Rvalue, UnsupportedReason>

Source

fn lower_pointer_coercion( &self, coercion: PointerCoercion, ) -> Option<PointerCast>

Source

fn lower_cast_kind(&self, kind: CastKind) -> Option<CastKind>

Source

fn lower_aggregate_kind( &self, aggregate_kind: &AggregateKind<'tcx>, ) -> Result<AggregateKind, UnsupportedReason>

Source

fn lower_bin_op(&self, bin_op: BinOp) -> Result<BinOp, UnsupportedReason>

Source

fn lower_null_op( &self, null_op: NullOp<'_>, ) -> Result<NullOp, UnsupportedReason>

Source

fn lower_operand( &self, op: &Operand<'tcx>, ) -> Result<Operand, UnsupportedReason>

Source

fn lower_constant( &self, constant: &ConstOperand<'tcx>, ) -> Result<Constant, UnsupportedReason>

Source

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.

Source

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.