rustc_smir::rustc_internal

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 RustcInternal for BinOp

Source§

type T<'tcx> = BinOp

Source§

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

Source§

impl RustcInternal for Mutability

Source§

type T<'tcx> = Mutability

Source§

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

Source§

impl RustcInternal for ProjectionElem

Source§

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

Source§

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

Source§

impl RustcInternal for Safety

Source§

type T<'tcx> = Safety

Source§

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

Source§

impl RustcInternal for UnOp

Source§

type T<'tcx> = UnOp

Source§

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

Source§

impl RustcInternal for MonoItem

Source§

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

Source§

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

Source§

impl RustcInternal for Abi

Source§

type T<'tcx> = ExternAbi

Source§

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

Source§

impl RustcInternal for BoundVariableKind

Source§

type T<'tcx> = BoundVariableKind

Source§

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

Source§

impl RustcInternal for ClosureKind

Source§

type T<'tcx> = ClosureKind

Source§

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

Source§

impl RustcInternal for DynKind

Source§

type T<'tcx> = DynKind

Source§

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

Source§

impl RustcInternal for ExistentialPredicate

Source§

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

Source§

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

Source§

impl RustcInternal for FloatTy

Source§

type T<'tcx> = FloatTy

Source§

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

Source§

impl RustcInternal for GenericArgKind

Source§

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

Source§

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

Source§

impl RustcInternal for IntTy

Source§

type T<'tcx> = IntTy

Source§

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

Source§

impl RustcInternal for Movability

Source§

type T<'tcx> = Movability

Source§

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

Source§

impl RustcInternal for Pattern

Source§

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

Source§

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

Source§

impl RustcInternal for RigidTy

Source§

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

Source§

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

Source§

impl RustcInternal for TermKind

Source§

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

Source§

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

Source§

impl RustcInternal for UintTy

Source§

type T<'tcx> = UintTy

Source§

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

Source§

impl RustcInternal for Layout

Source§

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

Source§

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

Source§

impl RustcInternal for DefId

Source§

type T<'tcx> = DefId

Source§

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

Source§

impl RustcInternal for AllocId

Source§

type T<'tcx> = AllocId

Source§

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

Source§

impl RustcInternal for Place

Source§

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

Source§

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

Source§

impl RustcInternal for Instance

Source§

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

Source§

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

Source§

impl RustcInternal for StaticDef

Source§

type T<'tcx> = DefId

Source§

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

Source§

impl RustcInternal for CrateItem

Source§

type T<'tcx> = DefId

Source§

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

Source§

impl RustcInternal for AdtDef

Source§

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

Source§

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

Source§

impl RustcInternal for ExistentialProjection

Source§

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

Source§

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

Source§

impl RustcInternal for ExistentialTraitRef

Source§

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

Source§

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

Source§

impl RustcInternal for FnSig

Source§

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

Source§

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

Source§

impl RustcInternal for GenericArgs

Source§

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

Source§

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

Source§

impl RustcInternal for MirConst

Source§

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

Source§

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

Source§

impl RustcInternal for Region

Source§

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

Source§

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

Source§

impl RustcInternal for Span

Source§

type T<'tcx> = Span

Source§

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

Source§

impl RustcInternal for TraitRef

Source§

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

Source§

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

Source§

impl RustcInternal for Ty

Source§

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

Source§

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

Source§

impl RustcInternal for TyConst

Source§

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

Source§

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

Source§

impl RustcInternal for VariantDef

Source§

type T<'tcx> = &'tcx VariantDef

Source§

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

Source§

impl RustcInternal for VariantIdx

Source§

type T<'tcx> = VariantIdx

Source§

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

Source§

impl RustcInternal for CrateNum

Source§

type T<'tcx> = CrateNum

Source§

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

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

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§