rustc_type_ir::relate

Trait Relate

Source
pub trait Relate<I: Interner>:
    TypeFoldable<I>
    + PartialEq
    + Copy {
    // Required method
    fn relate<R: TypeRelation<I>>(
        relation: &mut R,
        a: Self,
        b: Self,
    ) -> RelateResult<I, Self>;
}

Required Methods§

Source

fn relate<R: TypeRelation<I>>( relation: &mut R, a: Self, b: Self, ) -> RelateResult<I, Self>

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.

Implementors§

Source§

impl<I: Interner> Relate<I> for AliasTerm<I>

Source§

impl<I: Interner> Relate<I> for ExistentialProjection<I>

Source§

impl<I: Interner> Relate<I> for ExistentialTraitRef<I>

Source§

impl<I: Interner> Relate<I> for TraitPredicate<I>

Source§

impl<I: Interner> Relate<I> for TraitRef<I>

Source§

impl<I: Interner> Relate<I> for AliasTy<I>

Source§

impl<I: Interner> Relate<I> for FnSig<I>

Source§

impl<I: Interner, T: Relate<I>> Relate<I> for Binder<I, T>

impl<'tcx> Relate<TyCtxt<'tcx>> for &'tcx List<PolyExistentialPredicate<'tcx>>

impl<'tcx> Relate<TyCtxt<'tcx>> for ImplSubject<'tcx>

impl<'tcx> Relate<TyCtxt<'tcx>> for Expr<'tcx>

impl<'tcx> Relate<TyCtxt<'tcx>> for Const<'tcx>

impl<'tcx> Relate<TyCtxt<'tcx>> for GenericArg<'tcx>

impl<'tcx> Relate<TyCtxt<'tcx>> for Pattern<'tcx>

impl<'tcx> Relate<TyCtxt<'tcx>> for Region<'tcx>

impl<'tcx> Relate<TyCtxt<'tcx>> for Term<'tcx>

impl<'tcx> Relate<TyCtxt<'tcx>> for Ty<'tcx>

impl<'tcx> Relate<TyCtxt<'tcx>> for GenericArgsRef<'tcx>