Trait RustcInternal

Source
pub trait RustcInternal {
    type T<'tcx>;

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

Trait used to translate a stable construct to its rustc counterpart.

This is basically a mirror of crate::rustc_smir::Stable.

Required Associated Types§

Source

type T<'tcx>

Required Methods§

Source

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T> RustcInternal for Option<T>
where T: RustcInternal,

Source§

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

Source§

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

Source§

impl<T> RustcInternal for &T
where T: RustcInternal,

Source§

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

Source§

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

Source§

impl<T> RustcInternal for Vec<T>
where T: RustcInternal,

Source§

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

Source§

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

Implementors§

Source§

impl RustcInternal for BinOp

Source§

type T<'tcx> = BinOp

Source§

impl RustcInternal for Mutability

Source§

type T<'tcx> = Mutability

Source§

impl RustcInternal for ProjectionElem

Source§

type T<'tcx> = ProjectionElem<Local, Ty<'tcx>>

Source§

impl RustcInternal for RawPtrKind

Source§

type T<'tcx> = RawPtrKind

Source§

impl RustcInternal for Safety

Source§

type T<'tcx> = Safety

Source§

impl RustcInternal for UnOp

Source§

type T<'tcx> = UnOp

Source§

impl RustcInternal for MonoItem

Source§

type T<'tcx> = MonoItem<'tcx>

Source§

impl RustcInternal for Abi

Source§

type T<'tcx> = ExternAbi

Source§

impl RustcInternal for BoundVariableKind

Source§

impl RustcInternal for ClosureKind

Source§

type T<'tcx> = ClosureKind

Source§

impl RustcInternal for DynKind

Source§

type T<'tcx> = DynKind

Source§

impl RustcInternal for ExistentialPredicate

Source§

impl RustcInternal for FloatTy

Source§

type T<'tcx> = FloatTy

Source§

impl RustcInternal for GenericArgKind

Source§

type T<'tcx> = GenericArg<'tcx>

Source§

impl RustcInternal for IntTy

Source§

type T<'tcx> = IntTy

Source§

impl RustcInternal for Movability

Source§

type T<'tcx> = Movability

Source§

impl RustcInternal for Pattern

Source§

type T<'tcx> = Pattern<'tcx>

Source§

impl RustcInternal for RigidTy

Source§

type T<'tcx> = TyKind<TyCtxt<'tcx>>

Source§

impl RustcInternal for TermKind

Source§

type T<'tcx> = Term<'tcx>

Source§

impl RustcInternal for UintTy

Source§

type T<'tcx> = UintTy

Source§

impl RustcInternal for Layout

Source§

type T<'tcx> = Layout<'tcx>

Source§

impl RustcInternal for DefId

Source§

type T<'tcx> = DefId

Source§

impl RustcInternal for AllocId

Source§

type T<'tcx> = AllocId

Source§

impl RustcInternal for Instance

Source§

type T<'tcx> = Instance<'tcx>

Source§

impl RustcInternal for StaticDef

Source§

type T<'tcx> = DefId

Source§

impl RustcInternal for Place

Source§

type T<'tcx> = Place<'tcx>

Source§

impl RustcInternal for CrateItem

Source§

type T<'tcx> = DefId

Source§

impl RustcInternal for AdtDef

Source§

type T<'tcx> = AdtDef<'tcx>

Source§

impl RustcInternal for ExistentialProjection

Source§

impl RustcInternal for ExistentialTraitRef

Source§

impl RustcInternal for FnSig

Source§

type T<'tcx> = FnSig<TyCtxt<'tcx>>

Source§

impl RustcInternal for GenericArgs

Source§

type T<'tcx> = &'tcx RawList<(), GenericArg<'tcx>>

Source§

impl RustcInternal for MirConst

Source§

type T<'tcx> = Const<'tcx>

Source§

impl RustcInternal for Region

Source§

type T<'tcx> = Region<'tcx>

Source§

impl RustcInternal for Span

Source§

type T<'tcx> = Span

Source§

impl RustcInternal for TraitRef

Source§

type T<'tcx> = TraitRef<TyCtxt<'tcx>>

Source§

impl RustcInternal for Ty

Source§

type T<'tcx> = Ty<'tcx>

Source§

impl RustcInternal for TyConst

Source§

type T<'tcx> = Const<'tcx>

Source§

impl RustcInternal for VariantDef

Source§

type T<'tcx> = &'tcx VariantDef

Source§

impl RustcInternal for VariantIdx

Source§

type T<'tcx> = VariantIdx

Source§

impl RustcInternal for CrateNum

Source§

type T<'tcx> = CrateNum

Source§

impl<T> RustcInternal for Binder<T>
where T: RustcInternal, for<'tcx> T::T<'tcx>: TypeVisitable<TyCtxt<'tcx>>,

Source§

type T<'tcx> = Binder<TyCtxt<'tcx>, <T as RustcInternal>::T<'tcx>>