Trait rustc_smir::rustc_smir::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

§

type T = ValueAbi

source§

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

source§

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

§

type T = Endian

source§

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

source§

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

§

type T = FieldsShape

source§

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

source§

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

§

type T = IntegerLength

source§

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

source§

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

§

type T = Primitive

source§

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

source§

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

§

type T = Scalar

source§

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

source§

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

§

type T = TagEncoding

source§

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

source§

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

§

type T = VariantsShape

source§

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

source§

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

§

type T = Movability

source§

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

source§

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

§

type T = Mutability

source§

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

source§

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

§

type T = CoroutineKind

source§

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

source§

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

§

type T = CoroutineSource

source§

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

source§

impl<'tcx> Stable<'tcx> for Unsafety

§

type T = Safety

source§

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

source§

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

§

type T = Const

source§

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

source§

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

§

type T = VarDebugInfoContents

source§

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

source§

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

§

type T = Error

source§

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

source§

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

§

type T = GlobalAlloc

source§

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

source§

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

§

type T = Error

source§

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

source§

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

§

type T = MonoItem

source§

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

source§

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

§

type T = AggregateKind

source§

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

source§

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

§

type T = BinOp

source§

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

source§

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

§

type T = BorrowKind

source§

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

source§

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

§

type T = CastKind

source§

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

source§

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

§

type T = FakeReadCause

source§

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

source§

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

§

type T = InlineAsmOperand

source§

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

source§

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

§

type T = MutBorrowKind

source§

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

source§

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

§

type T = NonDivergingIntrinsic

source§

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

source§

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

§

type T = NullOp

source§

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

source§

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

§

type T = Operand

source§

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

source§

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

§

type T = RetagKind

source§

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

source§

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

§

type T = Rvalue

source§

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

source§

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

§

type T = StatementKind

source§

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

source§

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

§

type T = TerminatorKind

source§

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

source§

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

§

type T = UnOp

source§

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

source§

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

§

type T = UnwindAction

source§

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

source§

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

§

type T = PointerCoercion

source§

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

source§

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

§

type T = AdtKind

source§

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

source§

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

§

type T = ImplPolarity

source§

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

source§

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

§

type T = PredicatePolarity

source§

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

source§

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

§

type T = TermKind

source§

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

source§

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

§

type T = GenericArgKind

source§

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

source§

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

§

type T = GenericParamDefKind

source§

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

source§

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

§

type T = Error

source§

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

source§

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

§

type T = ExistentialPredicate

source§

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

source§

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

§

type T = BoundRegionKind

source§

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

source§

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

§

type T = BoundTyKind

source§

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

source§

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

§

type T = BoundVariableKind

source§

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

source§

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

§

type T = TraitSpecializationKind

source§

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

source§

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

§

type T = CallConvention

source§

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

source§

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

§

type T = PassMode

source§

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

source§

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

§

type T = Abi

source§

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

source§

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

§

type T = ClosureKind

source§

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

source§

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

§

type T = Variance

source§

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

source§

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

§

type T = AliasRelationDirection

source§

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

source§

impl<'tcx> Stable<'tcx> for AliasKind

§

type T = AliasKind

source§

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

source§

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

§

type T = DynKind

source§

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

source§

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

§

type T = FloatTy

source§

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

source§

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

§

type T = IntTy

source§

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

source§

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

§

type T = UintTy

source§

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

source§

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

§

type T = AddressSpace

source§

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

source§

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

§

type T = u64

source§

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

source§

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

§

type T = LayoutShape

source§

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

source§

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

§

type T = MachineSize

source§

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

source§

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

§

type T = WrappingRange

source§

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

source§

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

§

type T = Allocation

source§

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

source§

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

§

type T = Allocation

source§

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

source§

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

§

type T = AllocId

source§

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

source§

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

§

type T = Statement

source§

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

source§

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

§

type T = Body

source§

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

source§

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

§

type T = usize

source§

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

source§

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

§

type T = SourceInfo

source§

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

source§

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

§

type T = UserTypeProjection

source§

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

source§

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

§

type T = VarDebugInfo

source§

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

source§

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

§

type T = VarDebugInfoFragment

source§

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

source§

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

§

type T = Constant

source§

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

source§

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

§

type T = Place

source§

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

source§

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

§

type T = Terminator

source§

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

source§

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

§

type T = Const

source§

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

source§

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

§

type T = GenericParamDef

source§

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

source§

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

§

type T = Generics

source§

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

source§

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

§

type T = Instance

source§

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

source§

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

§

type T = Pattern

source§

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

source§

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

§

type T = CoercePredicate

source§

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

source§

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

§

type T = ExistentialProjection

source§

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

source§

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

§

type T = ExistentialTraitRef

source§

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

source§

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

§

type T = ProjectionPredicate

source§

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

source§

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

§

type T = SubtypePredicate

source§

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

source§

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

§

type T = TraitPredicate

source§

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

source§

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

§

type T = TraitRef

source§

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

source§

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

§

type T = Region

source§

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

source§

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

§

type T = FieldDef

source§

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

source§

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

§

type T = Ty

source§

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

source§

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

§

type T = AliasTy

source§

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

source§

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

§

type T = BoundTy

source§

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

source§

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

§

type T = FnSig

source§

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

source§

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

§

type T = ParamConst

source§

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

source§

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

§

type T = ParamTy

source§

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

source§

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

§

type T = TraitDecl

source§

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

source§

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

§

type T = usize

source§

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

source§

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

§

type T = ForeignModule

source§

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

source§

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

§

type T = Span

source§

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

source§

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

§

type T = String

source§

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

source§

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

§

type T = ArgAbi

source§

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

source§

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

§

type T = FnAbi

source§

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

source§

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

§

type T = usize

source§

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

source§

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

§

type T = Layout

source§

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

source§

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

§

type T = TyAndLayout

source§

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

source§

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

§

type T = VariantIdx

source§

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

source§

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

§

type T = AssertMessage

source§

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

source§

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

§

type T = ProjectionElem

source§

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

source§

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

§

type T = GenericArgs

source§

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

source§

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

§

type T = ClauseKind

source§

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

source§

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

§

type T = PredicateKind

source§

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

source§

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

§

type T = RegionKind

source§

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

source§

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

§

type T = TyKind

source§

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

source§

impl<'tcx, A, B, U, V> Stable<'tcx> for OutlivesPredicate<A, B>
where A: Stable<'tcx, T = U>, B: Stable<'tcx, T = V>,

§

type T = OutlivesPredicate<U, V>

source§

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

source§

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

§

type T = EarlyBinder<V>

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

§

type T = Binder<V>

source§

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

source§

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

§

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

§

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

§

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

§

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

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

§

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

§

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

source§

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

Implementors§