rustc_smir::rustc_smir

Trait Stable

source
pub trait Stable<'cx> {
    type T;

    // Required method
    fn stable(&self, tables: &mut Tables<'_>) -> Self::T;
}
Expand description

Trait used to convert between an internal MIR type to a Stable MIR type.

Required Associated Types§

source

type T

The stable representation of the type implementing Stable.

Required Methods§

source

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

Converts an object to the equivalent Stable MIR representation.

Implementations on Foreign Types§

source§

impl<'tcx> Stable<'tcx> for Abi

source§

type T = ValueAbi

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for Endian

source§

type T = Endian

source§

fn stable(&self, _tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for FieldsShape<FieldIdx>

source§

type T = FieldsShape

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for Float

source§

type T = FloatLength

source§

fn stable(&self, _tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for Integer

source§

type T = IntegerLength

source§

fn stable(&self, _tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for Primitive

source§

type T = Primitive

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for Scalar

source§

type T = Scalar

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for TagEncoding<VariantIdx>

source§

type T = TagEncoding

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for Variants<FieldIdx, VariantIdx>

source§

type T = VariantsShape

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for Movability

source§

type T = Movability

source§

fn stable(&self, _: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for Mutability

source§

type T = Mutability

source§

fn stable(&self, _: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for CoroutineKind

source§

type T = CoroutineKind

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for CoroutineSource

source§

type T = CoroutineSource

source§

fn stable(&self, _: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for Safety

source§

type T = Safety

source§

fn stable(&self, _: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for Const<'tcx>

source§

type T = MirConst

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for VarDebugInfoContents<'tcx>

source§

type T = VarDebugInfoContents

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for AllocError

source§

type T = Error

source§

fn stable(&self, _tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for GlobalAlloc<'tcx>

source§

type T = GlobalAlloc

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for ErrorHandled

source§

type T = Error

source§

fn stable(&self, _tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for MonoItem<'tcx>

source§

type T = MonoItem

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for AggregateKind<'tcx>

source§

type T = AggregateKind

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for BinOp

source§

type T = BinOp

source§

fn stable(&self, _: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for BorrowKind

source§

type T = BorrowKind

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for CastKind

source§

type T = CastKind

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for FakeBorrowKind

source§

type T = FakeBorrowKind

source§

fn stable(&self, _: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for FakeReadCause

source§

type T = FakeReadCause

source§

fn stable(&self, _: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for InlineAsmOperand<'tcx>

source§

type T = InlineAsmOperand

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for MutBorrowKind

source§

type T = MutBorrowKind

source§

fn stable(&self, _: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for NonDivergingIntrinsic<'tcx>

source§

type T = NonDivergingIntrinsic

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for NullOp<'tcx>

source§

type T = NullOp

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for Operand<'tcx>

source§

type T = Operand

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for RetagKind

source§

type T = RetagKind

source§

fn stable(&self, _: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for Rvalue<'tcx>

source§

type T = Rvalue

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for StatementKind<'tcx>

source§

type T = StatementKind

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for TerminatorKind<'tcx>

source§

type T = TerminatorKind

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for UnOp

source§

type T = UnOp

source§

fn stable(&self, _: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for UnwindAction

source§

type T = UnwindAction

source§

fn stable(&self, _: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for PointerCoercion

source§

type T = PointerCoercion

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for AdtKind

source§

type T = AdtKind

source§

fn stable(&self, _tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for GenericParamDefKind

source§

type T = GenericParamDefKind

source§

fn stable(&self, _: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for LayoutError<'tcx>

source§

type T = Error

source§

fn stable(&self, _tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for BoundRegionKind

source§

type T = BoundRegionKind

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for BoundTyKind

source§

type T = BoundTyKind

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for BoundVariableKind

source§

type T = BoundVariableKind

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for TraitSpecializationKind

source§

type T = TraitSpecializationKind

source§

fn stable(&self, _: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for Conv

source§

type T = CallConvention

source§

fn stable(&self, _tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for PassMode

source§

type T = PassMode

source§

fn stable(&self, _tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for Abi

source§

type T = Abi

source§

fn stable(&self, _: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for ClosureKind

source§

type T = ClosureKind

source§

fn stable(&self, _: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for Variance

source§

type T = Variance

source§

fn stable(&self, _: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for ImplPolarity

source§

type T = ImplPolarity

source§

fn stable(&self, _: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for PredicatePolarity

source§

type T = PredicatePolarity

source§

fn stable(&self, _: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for AliasRelationDirection

source§

type T = AliasRelationDirection

source§

fn stable(&self, _: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for AliasTyKind

source§

type T = AliasKind

source§

fn stable(&self, _: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for DynKind

source§

type T = DynKind

source§

fn stable(&self, _: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for FloatTy

source§

type T = FloatTy

source§

fn stable(&self, _: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for IntTy

source§

type T = IntTy

source§

fn stable(&self, _: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for UintTy

source§

type T = UintTy

source§

fn stable(&self, _: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for AddressSpace

source§

type T = AddressSpace

source§

fn stable(&self, _tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for Align

source§

type T = u64

source§

fn stable(&self, _tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for LayoutS<FieldIdx, VariantIdx>

source§

type T = LayoutShape

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for Size

source§

type T = MachineSize

source§

fn stable(&self, _tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for WrappingRange

source§

type T = WrappingRange

source§

fn stable(&self, _tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for Allocation

source§

type T = Allocation

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for ConstAllocation<'tcx>

source§

type T = Allocation

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for AllocId

source§

type T = AllocId

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for Statement<'tcx>

source§

type T = Statement

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for Body<'tcx>

source§

type T = Body

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for Local

source§

type T = usize

source§

fn stable(&self, _: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for SourceInfo

source§

type T = SourceInfo

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for UserTypeProjection

source§

type T = UserTypeProjection

source§

fn stable(&self, _tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for VarDebugInfo<'tcx>

source§

type T = VarDebugInfo

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for VarDebugInfoFragment<'tcx>

source§

type T = VarDebugInfoFragment

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for ConstOperand<'tcx>

source§

type T = ConstOperand

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for Place<'tcx>

source§

type T = Place

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for Terminator<'tcx>

source§

type T = Terminator

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for Const<'tcx>

source§

type T = TyConst

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for GenericParamDef

source§

type T = GenericParamDef

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for Generics

source§

type T = Generics

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for Instance<'tcx>

source§

type T = Instance

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for Pattern<'tcx>

source§

type T = Pattern

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for Region<'tcx>

source§

type T = Region

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for FieldDef

source§

type T = FieldDef

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for Ty<'tcx>

source§

type T = Ty

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for BoundTy

source§

type T = BoundTy

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for ParamConst

source§

type T = ParamConst

source§

fn stable(&self, _: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for ParamTy

source§

type T = ParamTy

source§

fn stable(&self, _: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for TraitDef

source§

type T = TraitDecl

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for UserTypeAnnotationIndex

source§

type T = usize

source§

fn stable(&self, _: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for ForeignModule

source§

type T = ForeignModule

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for Span

source§

type T = Span

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for Symbol

source§

type T = String

source§

fn stable(&self, _tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for ArgAbi<'tcx, Ty<'tcx>>

source§

type T = ArgAbi

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for FnAbi<'tcx, Ty<'tcx>>

source§

type T = FnAbi

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for FieldIdx

source§

type T = usize

source§

fn stable(&self, _: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for Layout<'tcx>

source§

type T = Layout

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for TyAndLayout<'tcx, Ty<'tcx>>

source§

type T = TyAndLayout

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for VariantIdx

source§

type T = VariantIdx

source§

fn stable(&self, _: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for AssertMessage<'tcx>

source§

type T = AssertMessage

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for PlaceElem<'tcx>

source§

type T = ProjectionElem

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for GenericArgKind<'tcx>

source§

type T = GenericArgKind

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for GenericArgs<'tcx>

source§

type T = GenericArgs

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for TermKind<'tcx>

source§

type T = TermKind

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for AliasTerm<'tcx>

source§

type T = AliasTerm

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for ClauseKind<'tcx>

source§

type T = ClauseKind

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for CoercePredicate<'tcx>

source§

type T = CoercePredicate

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for ExistentialPredicate<'tcx>

source§

type T = ExistentialPredicate

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for ExistentialProjection<'tcx>

source§

type T = ExistentialProjection

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for ExistentialTraitRef<'tcx>

source§

type T = ExistentialTraitRef

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for PredicateKind<'tcx>

source§

type T = PredicateKind

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for ProjectionPredicate<'tcx>

source§

type T = ProjectionPredicate

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for SubtypePredicate<'tcx>

source§

type T = SubtypePredicate

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for TraitPredicate<'tcx>

source§

type T = TraitPredicate

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for TraitRef<'tcx>

source§

type T = TraitRef

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for RegionKind<'tcx>

source§

type T = RegionKind

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for AliasTy<'tcx>

source§

type T = AliasTy

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for FnSig<'tcx>

source§

type T = FnSig

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx> Stable<'tcx> for TyKind<'tcx>

source§

type T = TyKind

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx, S, V> Stable<'tcx> for Binder<'tcx, S>
where S: Stable<'tcx, T = V>,

source§

type T = Binder<V>

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx, S, V> Stable<'tcx> for EarlyBinder<'tcx, S>
where S: Stable<'tcx, T = V>,

source§

type T = EarlyBinder<V>

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx, T> Stable<'tcx> for &[T]
where T: Stable<'tcx>,

source§

type T = Vec<<T as Stable<'tcx>>::T>

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx, T> Stable<'tcx> for Option<T>
where T: Stable<'tcx>,

source§

type T = Option<<T as Stable<'tcx>>::T>

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx, T> Stable<'tcx> for &T
where T: Stable<'tcx>,

source§

type T = <T as Stable<'tcx>>::T

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx, T> Stable<'tcx> for RangeInclusive<T>
where T: Stable<'tcx>,

source§

type T = RangeInclusive<<T as Stable<'tcx>>::T>

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx, T> Stable<'tcx> for OutlivesPredicate<'tcx, T>
where T: Stable<'tcx>,

source§

type T = OutlivesPredicate<<T as Stable<'tcx>>::T, Region>

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx, T, E> Stable<'tcx> for Result<T, E>
where T: Stable<'tcx>, E: Stable<'tcx>,

source§

type T = Result<<T as Stable<'tcx>>::T, <E as Stable<'tcx>>::T>

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

source§

impl<'tcx, T, U> Stable<'tcx> for (T, U)
where T: Stable<'tcx>, U: Stable<'tcx>,

source§

type T = (<T as Stable<'tcx>>::T, <U as Stable<'tcx>>::T)

source§

fn stable(&self, tables: &mut Tables<'_>) -> Self::T

Implementors§